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 4428770630..eaacf41e75 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 @@ import org.springframework.util.ClassUtils; *
  • {@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 6c01206abd..79378eb618 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 @@ import org.springframework.util.MimeType; *

  • {@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 85ede15b4d..81d07c93f2 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.Assert; 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 4819610bd3..15b16f521e 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.CollectionUtils; 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 26e87e371a..bdeee7fa64 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.MimeType; 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 e65aab696c..612449fe69 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.MimeType; 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 5ebab3d6bc..015449d18f 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.lang.Nullable; 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 32967665b8..e58a3b0a50 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.Assert; 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 580b35c002..a5dfacef57 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.Assert; 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 12016c184b..7d49906a97 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 @@ import org.springframework.util.Assert; *

    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 136f660140..4ef9b902de 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 @@ import org.springframework.util.TypeUtils; * 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 d1e1e580e7..daaa081524 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 @@ import org.springframework.util.xml.StaxUtils; * 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 adc81d96b1..a9f332645d 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 @@ import org.springframework.lang.Nullable; * <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 class Jackson2ObjectMapperFactoryBean implements FactoryBeanIf 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 a64e0f2278..5280926d32 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 @@ import org.springframework.lang.Nullable; * *

    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 5bed2ca929..da51c2f6f6 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 @@ import org.springframework.util.Assert; * *

    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 05a8660668..a5c3d1cb96 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 @@ import org.springframework.util.Assert; * *

    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 176cf840a5..8d7be38b49 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 @@ import org.springframework.web.servlet.view.AbstractView; * 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 b9f239d9b8..ea7af86ad2 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 @@ import org.springframework.web.servlet.View; * *

    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 05b5640785..3c4554cb5b 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 @@ import org.springframework.web.servlet.view.json.AbstractJackson2View; * *

    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 9a5e28e7f4..d6699ccf94 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.lang.Nullable; 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: *