diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/annotation/JacksonFeatures.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/annotation/JacksonFeatures.java
index 8b7931999e..c1d0475d47 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/annotation/JacksonFeatures.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/annotation/JacksonFeatures.java
@@ -12,7 +12,7 @@
* Annotation that can be used enable and/or disable various
* features for ObjectReader
s and ObjectWriter
s.
*/
-@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD })
+@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.PARAMETER })
@Retention(RetentionPolicy.RUNTIME)
@com.fasterxml.jackson.annotation.JacksonAnnotation
public @interface JacksonFeatures
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/JsonMappingExceptionMapper.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/JsonMappingExceptionMapper.java
index bc7a696cbe..5d1919ede9 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/JsonMappingExceptionMapper.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/JsonMappingExceptionMapper.java
@@ -1,10 +1,9 @@
package org.glassfish.jersey.jackson.internal.jackson.jaxrs.base;
+import com.fasterxml.jackson.databind.JsonMappingException;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.ext.ExceptionMapper;
-import com.fasterxml.jackson.databind.JsonMappingException;
-
/**
* Implementation if {@link ExceptionMapper} to send down a "400 Bad Request"
* response in the event that unmappable JSON is received.
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/JsonParseExceptionMapper.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/JsonParseExceptionMapper.java
index b61506b966..f96f09b091 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/JsonParseExceptionMapper.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/JsonParseExceptionMapper.java
@@ -1,10 +1,9 @@
package org.glassfish.jersey.jackson.internal.jackson.jaxrs.base;
+import com.fasterxml.jackson.core.JsonParseException;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.ext.ExceptionMapper;
-import com.fasterxml.jackson.core.JsonParseException;
-
/**
* Implementation of {@link ExceptionMapper} to send down a "400 Bad Request"
* in the event unparsable JSON is received.
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/ProviderBase.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/ProviderBase.java
index c190883feb..a0506dced9 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/ProviderBase.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/ProviderBase.java
@@ -83,10 +83,9 @@ public abstract class ProviderBase<
// then some primitive types
DEFAULT_UNTOUCHABLES.add(new ClassKey(char[].class));
- /* 27-Apr-2012, tatu: Ugh. As per
- * [https://github.com/FasterXML/jackson-jaxrs-json-provider/issues/12]
- * better revert this back, to make them untouchable again.
- */
+ // 27-Apr-2012, tatu: Ugh. As per
+ // [https://github.com/FasterXML/jackson-jaxrs-json-provider/issues/12]
+ // better revert this back, to make them untouchable again.
DEFAULT_UNTOUCHABLES.add(new ClassKey(String.class));
DEFAULT_UNTOUCHABLES.add(new ClassKey(byte[].class));
}
@@ -997,9 +996,7 @@ protected boolean _isIgnorableForWriting(ClassKey typeKey)
*/
protected IOException _createNoContentException()
{
- // 29-Jun-2016, tatu: With Jackson 2.8 we require JAX-RS 2.0 so this
- // is fine; earlier had complicated Reflection-based access
- return new NoContentException("No content (empty input stream)");
+ return new NoContentException("No content (empty input stream)");
}
/*
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/cfg/AnnotationBundleKey.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/cfg/AnnotationBundleKey.java
index 854a7edee9..79157f1eb6 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/cfg/AnnotationBundleKey.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/cfg/AnnotationBundleKey.java
@@ -122,11 +122,39 @@ private final boolean _equals(Annotation[] otherAnn)
if (otherAnn.length != len) {
return false;
}
- for (int i = 0; i < len; ++i) {
- if (_annotations[i] != otherAnn[i]) {
+
+ // 05-May-2019, tatu: If we wanted to true equality of contents we should
+ // do order-insensitive check; however, our use case is not unifying all
+ // possible permutations but rather trying to ensure that caching of same
+ // method signature is likely to match. So false negatives are acceptable
+ // over having to do order-insensitive comparison.
+
+ switch (len) {
+ default:
+ for (int i = 0; i < len; ++i) {
+ if (!_annotations[i].equals(otherAnn[i])) {
+ return false;
+ }
+ }
+ return true;
+
+ case 3:
+ if (!_annotations[2].equals(otherAnn[2])) {
+ return false;
+ }
+ // fall through
+ case 2:
+ if (!_annotations[1].equals(otherAnn[1])) {
+ return false;
+ }
+ // fall through
+ case 1:
+ if (!_annotations[0].equals(otherAnn[0])) {
return false;
}
+ // fall through
+ case 0:
}
return true;
}
-}
+}
\ No newline at end of file
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/cfg/EndpointConfigBase.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/cfg/EndpointConfigBase.java
index afc8e1aaf4..c48b5971ba 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/cfg/EndpointConfigBase.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/cfg/EndpointConfigBase.java
@@ -54,11 +54,6 @@ protected EndpointConfigBase(MapperConfig> config) {
_config = config;
}
- @Deprecated // since 2.6
- protected EndpointConfigBase() {
- _config = null;
- }
-
@SuppressWarnings("unchecked")
protected THIS add(Annotation[] annotations, boolean forWriting)
{
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJsonProvider.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJsonProvider.java
index 8df78ad3e1..9fecf427a9 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJsonProvider.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJsonProvider.java
@@ -231,12 +231,4 @@ protected JsonEndpointConfig _configForWriting(ObjectWriter writer,
return JsonEndpointConfig.forWriting(writer, annotations,
_jsonpFunctionName);
}
-
- /**
- * @deprecated Since 2.2 use {@link #hasMatchingMediaType(MediaType)} instead
- */
- @Deprecated
- protected boolean isJsonType(MediaType mediaType) {
- return hasMatchingMediaType(mediaType);
- }
}
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JsonEndpointConfig.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JsonEndpointConfig.java
index 5a4d9a68e8..cbe0b58942 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JsonEndpointConfig.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JsonEndpointConfig.java
@@ -4,7 +4,6 @@
import org.glassfish.jersey.jackson.internal.jackson.jaxrs.cfg.EndpointConfigBase;
import org.glassfish.jersey.jackson.internal.jackson.jaxrs.json.annotation.JSONP;
-import org.glassfish.jersey.jackson.internal.jackson.jaxrs.json.annotation.JacksonFeatures;
import com.fasterxml.jackson.databind.ObjectReader;
import com.fasterxml.jackson.databind.ObjectWriter;
@@ -61,7 +60,6 @@ public static JsonEndpointConfig forWriting(ObjectWriter writer,
/**********************************************************
*/
- @SuppressWarnings("deprecation")
@Override
protected void addAnnotation(Class extends Annotation> type,
Annotation annotation, boolean forWriting)
@@ -70,15 +68,6 @@ protected void addAnnotation(Class extends Annotation> type,
if (forWriting) {
_jsonp = new JSONP.Def((JSONP) annotation);
}
- } else if (type == JacksonFeatures.class) {
- JacksonFeatures feats = (JacksonFeatures) annotation;
- if (forWriting) {
- _serEnable = nullIfEmpty(feats.serializationEnable());
- _serDisable = nullIfEmpty(feats.serializationDisable());
- } else {
- _deserEnable = nullIfEmpty(feats.deserializationEnable());
- _deserDisable = nullIfEmpty(feats.deserializationDisable());
- }
} else {
super.addAnnotation(type, annotation, forWriting);
}
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/PackageVersion.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/PackageVersion.java
index 05d75b9060..46376a4619 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/PackageVersion.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/PackageVersion.java
@@ -11,7 +11,7 @@
*/
public final class PackageVersion implements Versioned {
public final static Version VERSION = VersionUtil.parseVersion(
- "2.8.4", "com.fasterxml.jackson.jaxrs", "jackson-jaxrs-json-provider");
+ "2.10.1", "com.fasterxml.jackson.jaxrs", "jackson-jaxrs-json-provider");
@Override
public Version version() {
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/annotation/JacksonFeatures.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/annotation/JacksonFeatures.java
deleted file mode 100644
index 483107a9ef..0000000000
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/annotation/JacksonFeatures.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.glassfish.jersey.jackson.internal.jackson.jaxrs.json.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.SerializationFeature;
-
-/**
- * Annotation that can be used enable and/or disable various
- * features for ObjectReader
s and ObjectWriter
s.
- *
- * @deprecated Since 2.2, use shared {@link com.fasterxml.jackson.jaxrs.annotation.JacksonFeatures} instead
- */
-@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD })
-@Retention(RetentionPolicy.RUNTIME)
-@com.fasterxml.jackson.annotation.JacksonAnnotation
-@Deprecated // since 2.2
-public @interface JacksonFeatures
-{
- /**
- * Deserialization features to enable.
- */
- public DeserializationFeature[] deserializationEnable() default { };
-
- /**
- * Deserialization features to disable.
- */
- public DeserializationFeature[] deserializationDisable() default { };
-
- /**
- * Serialization features to enable.
- */
- public SerializationFeature[] serializationEnable() default { };
-
- /**
- * Serialization features to disable.
- */
- public SerializationFeature[] serializationDisable() default { };
-}
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/util/EndpointAsBeanProperty.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/util/EndpointAsBeanProperty.java
index 89ed89a20c..876a708c8d 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/util/EndpointAsBeanProperty.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/util/EndpointAsBeanProperty.java
@@ -16,11 +16,12 @@
* limitations, we are only given annotations associated, and that
* has to do.
*
- * NOTE: not yet used by JAX-RS provider, directly, as of Jackson 2.6.
+ * NOTE: not yet used by JAX-RS provider, directly, as of Jackson 2.9
*/
public class EndpointAsBeanProperty
extends BeanProperty.Std
{
+ private static final long serialVersionUID = 1L;
public final static PropertyName ENDPOINT_NAME = new PropertyName("JAX-RS/endpoint");
private final static AnnotationMap NO_ANNOTATIONS = new AnnotationMap();
@@ -33,7 +34,7 @@ public EndpointAsBeanProperty(PropertyName name, JavaType type, Annotation[] ann
{
// TODO: find and pass wrapper; isRequired marker?
super(name, type, /*PropertyName wrapperName*/ null,
- null, null, PropertyMetadata.STD_OPTIONAL);
+ null, PropertyMetadata.STD_OPTIONAL);
_rawAnnotations = annotations;
_annotations = null;
}
diff --git a/pom.xml b/pom.xml
index 408b66b690..dda18bb654 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2113,7 +2113,7 @@