From 792371ac1ff9ecd544ca4ab50c5b145ed16161be Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Thu, 17 Nov 2022 16:52:52 +0100 Subject: [PATCH] Generalize Jackson version numbers This commit removes specific version info from Jackson codecs and converters, in favor of generic info or removing the version information all together. See gh-29508 --- .../support/converter/MappingJackson2MessageConverter.java | 2 -- .../converter/MappingJackson2MessageConverter.java | 4 +--- .../http/codec/json/AbstractJackson2Decoder.java | 4 +--- .../http/codec/json/AbstractJackson2Encoder.java | 2 +- .../http/codec/json/Jackson2CodecSupport.java | 2 +- .../http/codec/json/Jackson2JsonDecoder.java | 2 +- .../http/codec/json/Jackson2JsonEncoder.java | 4 ++-- .../http/codec/json/Jackson2SmileDecoder.java | 2 +- .../http/codec/json/Jackson2SmileEncoder.java | 4 ++-- .../cbor/MappingJackson2CborHttpMessageConverter.java | 4 +--- .../json/AbstractJackson2HttpMessageConverter.java | 2 -- .../http/converter/json/Jackson2ObjectMapperBuilder.java | 2 -- .../converter/json/Jackson2ObjectMapperFactoryBean.java | 6 ++---- .../converter/json/MappingJackson2HttpMessageConverter.java | 4 +--- .../smile/MappingJackson2SmileHttpMessageConverter.java | 4 +--- .../xml/MappingJackson2XmlHttpMessageConverter.java | 4 +--- .../web/servlet/view/json/AbstractJackson2View.java | 4 +--- .../web/servlet/view/json/MappingJackson2JsonView.java | 2 -- .../web/servlet/view/xml/MappingJackson2XmlView.java | 4 +--- .../web/socket/sockjs/frame/Jackson2SockJsMessageCodec.java | 4 ++-- 20 files changed, 20 insertions(+), 46 deletions(-) diff --git a/spring-jms/src/main/java/org/springframework/jms/support/converter/MappingJackson2MessageConverter.java b/spring-jms/src/main/java/org/springframework/jms/support/converter/MappingJackson2MessageConverter.java index 4428770630b4..eaacf41e75c7 100644 --- a/spring-jms/src/main/java/org/springframework/jms/support/converter/MappingJackson2MessageConverter.java +++ b/spring-jms/src/main/java/org/springframework/jms/support/converter/MappingJackson2MessageConverter.java @@ -54,8 +54,6 @@ *
  • {@link DeserializationFeature#FAIL_ON_UNKNOWN_PROPERTIES} is disabled
  • * * - *

    Compatible with Jackson 2.9 to 2.12, as of Spring 5.3. - * * @author Mark Pollack * @author Dave Syer * @author Juergen Hoeller diff --git a/spring-messaging/src/main/java/org/springframework/messaging/converter/MappingJackson2MessageConverter.java b/spring-messaging/src/main/java/org/springframework/messaging/converter/MappingJackson2MessageConverter.java index 6c01206abd3c..79378eb6189f 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/converter/MappingJackson2MessageConverter.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/converter/MappingJackson2MessageConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,8 +52,6 @@ *

  • {@link DeserializationFeature#FAIL_ON_UNKNOWN_PROPERTIES} is disabled
  • * * - *

    Compatible with Jackson 2.9 to 2.12, as of Spring 5.3. - * * @author Rossen Stoyanchev * @author Juergen Hoeller * @author Sebastien Deleuze diff --git a/spring-web/src/main/java/org/springframework/http/codec/json/AbstractJackson2Decoder.java b/spring-web/src/main/java/org/springframework/http/codec/json/AbstractJackson2Decoder.java index 85ede15b4d98..81d07c93f278 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/json/AbstractJackson2Decoder.java +++ b/spring-web/src/main/java/org/springframework/http/codec/json/AbstractJackson2Decoder.java @@ -52,9 +52,7 @@ import org.springframework.util.MimeType; /** - * Abstract base class for Jackson 2.14 decoding, leveraging non-blocking parsing. - * - *

    Compatible with Jackson 2.14, as of Spring 6.0. + * Abstract base class for Jackson 2.x decoding, leveraging non-blocking parsing. * * @author Sebastien Deleuze * @author Rossen Stoyanchev diff --git a/spring-web/src/main/java/org/springframework/http/codec/json/AbstractJackson2Encoder.java b/spring-web/src/main/java/org/springframework/http/codec/json/AbstractJackson2Encoder.java index 4819610bd380..15b16f521e62 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/json/AbstractJackson2Encoder.java +++ b/spring-web/src/main/java/org/springframework/http/codec/json/AbstractJackson2Encoder.java @@ -59,7 +59,7 @@ import org.springframework.util.MimeType; /** - * Base class providing support methods for Jackson 2.9 encoding. For non-streaming use + * Base class providing support methods for Jackson 2.x encoding. For non-streaming use * cases, {@link Flux} elements are collected into a {@link List} before serialization for * performance reasons. * diff --git a/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2CodecSupport.java b/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2CodecSupport.java index 26e87e371a4e..bdeee7fa6471 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2CodecSupport.java +++ b/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2CodecSupport.java @@ -48,7 +48,7 @@ import org.springframework.util.ObjectUtils; /** - * Base class providing support methods for Jackson 2.9 encoding and decoding. + * Base class providing support methods for Jackson 2.x encoding and decoding. * * @author Sebastien Deleuze * @author Rossen Stoyanchev diff --git a/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2JsonDecoder.java b/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2JsonDecoder.java index e65aab696c74..612449fe69f0 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2JsonDecoder.java +++ b/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2JsonDecoder.java @@ -35,7 +35,7 @@ import org.springframework.util.MimeTypeUtils; /** - * Decode a byte stream into JSON and convert to Object's with Jackson 2.14, + * Decode a byte stream into JSON and convert to Object's with Jackson 2.x, * leveraging non-blocking parsing. * * @author Sebastien Deleuze diff --git a/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2JsonEncoder.java b/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2JsonEncoder.java index 5ebab3d6bc50..015449d18f59 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2JsonEncoder.java +++ b/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2JsonEncoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ import org.springframework.util.MimeType; /** - * Encode from an {@code Object} stream to a byte stream of JSON objects using Jackson 2.9. + * Encode from an {@code Object} stream to a byte stream of JSON objects using Jackson 2.x. * For non-streaming use cases, {@link Flux} elements are collected into a {@link List} * before serialization for performance reason. * diff --git a/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2SmileDecoder.java b/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2SmileDecoder.java index 32967665b89b..e58a3b0a509d 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2SmileDecoder.java +++ b/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2SmileDecoder.java @@ -24,7 +24,7 @@ import org.springframework.util.MimeType; /** - * Decode a byte stream into Smile and convert to Object's with Jackson 2.14, + * Decode a byte stream into Smile and convert to Object's with Jackson 2.x, * leveraging non-blocking parsing. * * @author Sebastien Deleuze diff --git a/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2SmileEncoder.java b/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2SmileEncoder.java index 580b35c0027d..a5dfacef5757 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2SmileEncoder.java +++ b/spring-web/src/main/java/org/springframework/http/codec/json/Jackson2SmileEncoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ import org.springframework.util.MimeType; /** - * Encode from an {@code Object} stream to a byte stream of Smile objects using Jackson 2.9. + * Encode from an {@code Object} stream to a byte stream of Smile objects using Jackson 2.x. * For non-streaming use cases, {@link Flux} elements are collected into a {@link List} * before serialization for performance reason. * diff --git a/spring-web/src/main/java/org/springframework/http/converter/cbor/MappingJackson2CborHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/cbor/MappingJackson2CborHttpMessageConverter.java index 12016c184b87..7d49906a9740 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/cbor/MappingJackson2CborHttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/cbor/MappingJackson2CborHttpMessageConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,8 +37,6 @@ *

    The default constructor uses the default configuration provided by * {@link Jackson2ObjectMapperBuilder}. * - *

    Compatible with Jackson 2.9 to 2.12, as of Spring 5.3. - * * @author Sebastien Deleuze * @since 5.0 */ diff --git a/spring-web/src/main/java/org/springframework/http/converter/json/AbstractJackson2HttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/json/AbstractJackson2HttpMessageConverter.java index 136f660140a7..4ef9b902defd 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/json/AbstractJackson2HttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/json/AbstractJackson2HttpMessageConverter.java @@ -69,8 +69,6 @@ * Abstract base class for Jackson based and content type independent * {@link HttpMessageConverter} implementations. * - *

    Compatible with Jackson 2.9 to 2.12, as of Spring 5.3. - * * @author Arjen Poutsma * @author Keith Donald * @author Rossen Stoyanchev diff --git a/spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.java b/spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.java index d1e1e580e782..daaa08152432 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.java +++ b/spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.java @@ -89,8 +89,6 @@ * support for Kotlin classes and data classes * * - *

    Compatible with Jackson 2.9 to 2.12, as of Spring 5.3. - * * @author Sebastien Deleuze * @author Juergen Hoeller * @author Tadaya Tsuyukubo diff --git a/spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBean.java b/spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBean.java index adc81d96b164..a9f332645dee 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBean.java +++ b/spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -129,8 +129,6 @@ * <property name="modulesToInstall" value="myapp.jackson.MySampleModule,myapp.jackson.MyOtherModule"/> * </bean> * - *

    Compatible with Jackson 2.9 to 2.12, as of Spring 5.3. - * * @author Dmitry Katsubo * @author Rossen Stoyanchev * @author Brian Clozel @@ -410,7 +408,7 @@ public final void setModulesToInstall(Class... modules) { /** * Set whether to let Jackson find available modules via the JDK ServiceLoader, - * based on META-INF metadata in the classpath. Requires Jackson 2.2 or higher. + * based on META-INF metadata in the classpath. *

    If this mode is not set, Spring's Jackson2ObjectMapperFactoryBean itself * will try to find the JSR-310 and Joda-Time support modules on the classpath - * provided that Java 8 and Joda-Time themselves are available, respectively. diff --git a/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java index a64e0f2278e8..5280926d3244 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,8 +36,6 @@ * *

    The default constructor uses the default configuration provided by {@link Jackson2ObjectMapperBuilder}. * - *

    Compatible with Jackson 2.9 to 2.12, as of Spring 5.3. - * * @author Arjen Poutsma * @author Keith Donald * @author Rossen Stoyanchev diff --git a/spring-web/src/main/java/org/springframework/http/converter/smile/MappingJackson2SmileHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/smile/MappingJackson2SmileHttpMessageConverter.java index 5bed2ca92956..da51c2f6f6a6 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/smile/MappingJackson2SmileHttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/smile/MappingJackson2SmileHttpMessageConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,8 +35,6 @@ * *

    The default constructor uses the default configuration provided by {@link Jackson2ObjectMapperBuilder}. * - *

    Compatible with Jackson 2.9 to 2.12, as of Spring 5.3. - * * @author Sebastien Deleuze * @since 5.0 */ diff --git a/spring-web/src/main/java/org/springframework/http/converter/xml/MappingJackson2XmlHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/xml/MappingJackson2XmlHttpMessageConverter.java index 05a866066833..a5c3d1cb9622 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/xml/MappingJackson2XmlHttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/xml/MappingJackson2XmlHttpMessageConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,8 +37,6 @@ * *

    The default constructor uses the default configuration provided by {@link Jackson2ObjectMapperBuilder}. * - *

    Compatible with Jackson 2.9 to 2.12, as of Spring 5.3. - * * @author Sebastien Deleuze * @since 4.1 */ diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/AbstractJackson2View.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/AbstractJackson2View.java index 176cf840a526..8d7be38b4941 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/AbstractJackson2View.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/AbstractJackson2View.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,8 +40,6 @@ * Abstract base class for Jackson based and content type independent * {@link AbstractView} implementations. * - *

    Compatible with Jackson 2.9 to 2.12, as of Spring 5.3. - * * @author Jeremy Grelle * @author Arjen Poutsma * @author Rossen Stoyanchev diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java index b9f239d9b8e3..ea7af86ad2e4 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java @@ -42,8 +42,6 @@ * *

    The default constructor uses the default configuration provided by {@link Jackson2ObjectMapperBuilder}. * - *

    Compatible with Jackson 2.9 to 2.12, as of Spring 5.3. - * * @author Jeremy Grelle * @author Arjen Poutsma * @author Rossen Stoyanchev diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/MappingJackson2XmlView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/MappingJackson2XmlView.java index 05b564078592..3c4554cb5b65 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/MappingJackson2XmlView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/MappingJackson2XmlView.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,8 +38,6 @@ * *

    The default constructor uses the default configuration provided by {@link Jackson2ObjectMapperBuilder}. * - *

    Compatible with Jackson 2.9 to 2.12, as of Spring 5.3. - * * @author Sebastien Deleuze * @since 4.1 * @see org.springframework.web.servlet.view.json.MappingJackson2JsonView diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/Jackson2SockJsMessageCodec.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/Jackson2SockJsMessageCodec.java index 9a5e28e7f4d6..d6699ccf94e4 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/Jackson2SockJsMessageCodec.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/Jackson2SockJsMessageCodec.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ import org.springframework.util.Assert; /** - * A Jackson 2.6+ codec for encoding and decoding SockJS messages. + * A Jackson 2.x codec for encoding and decoding SockJS messages. * *

    It customizes Jackson's default properties with the following ones: *