-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Timestamp handling regression 2.7.12 -> 3.0.0 #2593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Classpath contains following jackson modules: |
Quick note: it happens on 3.0.0-M1 |
Upon closer analysis of this issue, this problem does not only affect timestamps (such as date/time fields/properties), but also non-properly-evaluated scalar values, such as For instance, in test class
Technically, caused by (for example):
This specific problem reproduces with the (flattened) Unfortunately, this test class is not being run as part of the SD Redis test suite using Additionally, this problem only occurs for the "flattened" configuration and works properly with non-flattened configuration. |
Upon even closer inspection, the only reason why this properly worked in the past (i.e. with SD Redis And, once again, since the With the proper fix, your "hash" Map<String, Object> hash = Map.of("@class", example.app.SomeValueTypeWithTimestamp.class.getName(),
"lastAssigment", "2023-06-05T11:08:33.107451Z");
... |
There is still some issue with newer versions Jackson combined with SD Redis |
This was tested against jackson bom 2.14.2 first and 2.13.5 second as I first suspected this could be an issue with jackson. On other projects during Spring Boot 3 migration I've already faced issues with jackson 2.15.0 and 2.15.1 and records. Changing jackson doesn't affect this case in any way from my perspective (and the provided test). |
Some change between 2.7.12 and 3.0.0-M1 is causing this. |
…d Java Time types. Once again, the SD Redis Jackson2HashMapper can now de/serialize Objects with BigDecimal/BigInteger values along with java.time types, such as java.time.LocalDateTime. Additionally, splits the unit tests for flattening and unflattening of the hash mapping into 2 separate test classes to be picked up in the SD Redis test suite. Resolves spring-projects#2593
* Cleanup source code in Jackson2HashMapper; Edit Javadoc. * Add test cases for the un/flattened mapping of an Object with a timestamp (LocalDateTime) as specified in Issue spring-projects#2593. Closes spring-projects#2593
With the help of @christophstrobl, we managed to resolve this issue. However, your test case shown above is not exactly precise, particularly in how Jackson would resolve a hash from a non-flattened arrangement. In the flattened case, you would get back a To demonstrate this, I have written 2 cases to show by example what you would need to pass to the |
* Cleanup source code in Jackson2HashMapper; Edit Javadoc. * Add test cases for the un/flattened mapping of an Object with a timestamp (LocalDateTime) as provided by the user in Issue spring-projects#2593. Closes spring-projects#2593
* Cleanup source code in Jackson2HashMapper; Edit Javadoc. * Add test cases for the un/flattened mapping of an Object with a timestamp (LocalDateTime) as provided by the user in Issue spring-projects#2593. Closes spring-projects#2593
…d Java Time types. Once again, the SD Redis Jackson2HashMapper can now de/serialize Objects with BigDecimal/BigInteger values along with java.time types, such as java.time.LocalDateTime. Additionally, splits the unit tests for flattening and unflattening of the hash mapping into 2 separate test classes to be picked up in the SD Redis test suite. Resolves spring-projects#2593
* Cleanup source code in Jackson2HashMapper; Edit Javadoc. * Add test cases for the un/flattened mapping of an Object with a timestamp (LocalDateTime) as provided by the user in Issue spring-projects#2593. Closes spring-projects#2593
…d Java Time types. Once again, the SD Redis Jackson2HashMapper can now de/serialize Objects with BigDecimal/BigInteger values along with java.time types, such as java.time.LocalDateTime. Additionally, splits the unit tests for flattening and unflattening of the hash mapping into 2 separate test classes to be picked up in the SD Redis test suite. Resolves spring-projects#2593
* Cleanup source code in Jackson2HashMapper; Edit Javadoc. * Add test cases for the un/flattened mapping of an Object with a timestamp (LocalDateTime) as provided by the user in Issue spring-projects#2593. Closes spring-projects#2593
Unable to back port this fix to I am not sure what the alternative and equivalent configuration would be for Jackson However, given SD Redis |
Following code works fine on 2.7.12 but fails on 3.0.0:
The text was updated successfully, but these errors were encountered: