Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/2.x' into 'upstream/3.0'
Browse files Browse the repository at this point in the history
Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
  • Loading branch information
senivam committed Sep 25, 2024
2 parents d341493 + 2fd3e28 commit f222515
Show file tree
Hide file tree
Showing 20 changed files with 218 additions and 68 deletions.
12 changes: 6 additions & 6 deletions NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,25 @@ Bootstrap v3.3.7
* Project: http://getbootstrap.com
* Copyright: 2011-2016 Twitter, Inc

Google Guava Version 18.0
Google Guava Version 33.3.0-jre
* License: Apache License, 2.0
* Copyright (C) 2009 The Guava Authors
* Copyright (C) 2009, 2024 The Guava Authors

jakarta.inject Version: 1
jakarta.inject Version: 2.0.1
* License: Apache License, 2.0
* Copyright (C) 2009 The JSR-330 Expert Group
* Copyright (C) 2009, 2021 The JSR-330 Expert Group

Javassist Version 3.30.2-GA
* License: Apache License, 2.0
* Project: http://www.javassist.org/
* Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.

Jackson JAX-RS Providers Version 2.17.1
Jackson JAX-RS Providers Version 2.17.2
* License: Apache License, 2.0
* Project: https://github.com/FasterXML/jackson-jaxrs-providers
* Copyright: (c) 2009-2024 FasterXML, LLC. All rights reserved unless otherwise indicated.

jQuery v1.12.4
jQuery v3.7.1
* License: jquery.org/license
* Project: jquery.org
* Copyright: (c) jQuery Foundation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.glassfish.jersey;

import javax.ws.rs.core.Application;
import jakarta.ws.rs.core.Application;

/**
* Implementation of this interface is capable of returning {@link Application}.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

/**
* Common Jersey core io classes.
*/
package org.glassfish.jersey.io;
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package org.glassfish.jersey.io.spi;

import java.io.Closeable;
import java.io.Flushable;
import java.io.IOException;
import java.io.OutputStream;

/**
* A marker interface that the stream provided to Jersey can implement,
* noting that the stream does not need to call {@link #flush()} prior to {@link #close()}.
* That way, {@link #flush()} method is not called twice.
*
* <p>
* Usable by {@link javax.ws.rs.client.ClientRequestContext#setEntityStream(OutputStream)}.
* Usable by {@link javax.ws.rs.container.ContainerResponseContext#setEntityStream(OutputStream)}.
* </p>
*
* <p>
* This marker interface can be useful for the customer OutputStream to know the {@code flush} did not come from
* Jersey before close. By default, when the entity stream is to be closed by Jersey, {@code flush} is called first.
* </p>
*/
public interface FlushedCloseable extends Flushable, Closeable {
/**
* Flushes this stream by writing any buffered output to the underlying stream.
* Then closes this stream and releases any system resources associated
* with it. If the stream is already closed then invoking this
* method has no effect.
*
* <p> As noted in {@link AutoCloseable#close()}, cases where the
* close may fail require careful attention. It is strongly advised
* to relinquish the underlying resources and to internally
* <em>mark</em> the {@code Closeable} as closed, prior to throwing
* the {@code IOException}.
*
* @throws IOException if an I/O error occurs
*/
public void close() throws IOException;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

/**
* Common Jersey core io SPI classes.
*/
package org.glassfish.jersey.io.spi;
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import org.glassfish.jersey.internal.util.collection.LazyValue;
import org.glassfish.jersey.internal.util.collection.Value;
import org.glassfish.jersey.internal.util.collection.Values;
import org.glassfish.jersey.io.spi.FlushedCloseable;

/**
* Base outbound message context implementation.
Expand Down Expand Up @@ -561,11 +562,13 @@ public void close() {
if (hasEntity()) {
try {
final OutputStream es = getEntityStream();
es.flush();
if (!FlushedCloseable.class.isInstance(es)) {
es.flush();
}
es.close();
} catch (IOException e) {
// Happens when the client closed connection before receiving the full response.
// This is OK and not interesting in vast majority of the cases
// This is OK and not interesting in the vast majority of the cases
// hence the log level set to FINE to make sure it does not flood the log unnecessarily
// (especially for clients disconnecting from SSE listening, which is very common).
Logger.getLogger(OutboundMessageContext.class.getName()).log(Level.FINE, e.getMessage(), e);
Expand Down
16 changes: 8 additions & 8 deletions examples/NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ aopalliance Version 1

Bean Validation API 3.0.2
* License: Apache License, 2.0
* Project: http://beanvalidation.org/1.1/
* Copyright: 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
* Project: http://beanvalidation.org/3.0/
* Copyright: 2009, 2020 Red Hat, Inc. and/or its affiliates, and individual contributors
* by the @authors tag.

Hibernate Validator CDI, 7.0.5.Final
Expand All @@ -58,25 +58,25 @@ CDI API Version 3.0
* Project: http://www.seamframework.org/Weld
* Copyright 2010, Red Hat, Inc., and individual contributors by the @authors tag.

Google Guava Version 18.0
Google Guava Version 33.3.0-jre
* License: Apache License, 2.0
* Copyright (C) 2009 The Guava Authors
* Copyright (C) 2009, 2024 The Guava Authors

jakarta.inject Version: 1
jakarta.inject Version: 2.0.1
* License: Apache License, 2.0
* Copyright (C) 2009 The JSR-330 Expert Group
* Copyright (C) 2009, 2021 The JSR-330 Expert Group

Javassist Version 3.30.2-GA
* License: Apache License, 2.0
* Project: http://www.javassist.org/
* Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.

Jackson JAX-RS Providers Version 2.17.1
Jackson JAX-RS Providers Version 2.17.2
* License: Apache License, 2.0
* Project: https://github.com/FasterXML/jackson-jaxrs-providers
* Copyright: (c) 2009-2023 FasterXML, LLC. All rights reserved unless otherwise indicated.

jQuery v1.12.4
jQuery v3.7.1
* License: jquery.org/license
* Project: jquery.org
* Copyright: (c) jQuery Foundation
Expand Down
4 changes: 2 additions & 2 deletions examples/extended-wadl-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
<!-- logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>2.0.13</version>
<artifactId>slf4j-reload4j</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>

Expand Down
4 changes: 2 additions & 2 deletions examples/osgi-http-service/functional-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@
<!-- Logging dependencies-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>2.0.13</version>
<artifactId>slf4j-reload4j</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>

Expand Down
9 changes: 9 additions & 0 deletions examples/servlet3-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@
</build>

<profiles>
<profile>
<id>jdk8_tests</id>
<activation>
<jdk>1.8</jdk>
</activation>
<properties>
<junit5.version>${junit5.jdk8.version}</junit5.version>
</properties>
</profile>
<profile>
<id>pre-release</id>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
import org.jboss.weld.bean.proxy.ProxyFactory;
import org.jboss.weld.manager.BeanManagerImpl;

import javax.enterprise.context.Dependent;
import javax.enterprise.context.spi.CreationalContext;
import javax.ws.rs.RuntimeType;
import jakarta.enterprise.context.Dependent;
import jakarta.enterprise.context.spi.CreationalContext;
import jakarta.ws.rs.RuntimeType;
import java.lang.annotation.Annotation;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Supplier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import org.jboss.weld.bean.StringBeanIdentifier;
import org.jboss.weld.bean.proxy.ContextBeanInstance;

import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.PassivationCapable;
import jakarta.enterprise.inject.spi.Bean;
import jakarta.enterprise.inject.spi.PassivationCapable;
import java.lang.reflect.Method;
import java.util.WeakHashMap;
import java.util.function.Supplier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Supplier;

import javax.enterprise.context.Dependent;
import javax.enterprise.context.spi.CreationalContext;
import jakarta.enterprise.context.Dependent;
import jakarta.enterprise.context.spi.CreationalContext;

import org.glassfish.jersey.internal.inject.SupplierClassBinding;
import org.glassfish.jersey.internal.inject.SupplierInstanceBinding;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import java.util.WeakHashMap;
import java.util.function.Supplier;

import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.PassivationCapable;
import jakarta.enterprise.inject.spi.Bean;
import jakarta.enterprise.inject.spi.PassivationCapable;

/**
* {@link org.glassfish.jersey.internal.inject.PerThread} scope bean instance used from
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package org.glassfish.jersey.jsonb;

import jakarta.ws.rs.RuntimeType;
import jakarta.ws.rs.core.Application;
import jakarta.ws.rs.core.Configuration;
import jakarta.ws.rs.core.Feature;
import jakarta.ws.rs.core.FeatureContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import javax.ws.rs.RuntimeType;
import javax.ws.rs.core.Application;
import javax.ws.rs.core.FeatureContext;
import jakarta.ws.rs.RuntimeType;
import jakarta.ws.rs.core.Application;
import jakarta.ws.rs.core.FeatureContext;
import java.lang.reflect.Proxy;
import java.util.concurrent.atomic.AtomicReference;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
public final class PackageVersion implements Versioned {
public final static Version VERSION = VersionUtil.parseVersion(
"2.17.1", "com.fasterxml.jackson.jaxrs", "jackson-jaxrs-json-provider");
"2.17.2", "com.fasterxml.jackson.jaxrs", "jackson-jaxrs-json-provider");

@Override
public Version version() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The project maintains the following source code repositories:

## Third-party Content

Jackson JAX-RS Providers version 2.17.1
Jackson JAX-RS Providers version 2.17.2
* License: Apache License, 2.0
* Project: https://github.com/FasterXML/jackson-jaxrs-providers
* Copyright: (c) 2009-2023 FasterXML, LLC. All rights reserved unless otherwise indicated.
Loading

0 comments on commit f222515

Please sign in to comment.