Skip to content
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

re-enable jdk9 collections support. #1481

Merged
merged 2 commits into from Sep 23, 2023

Conversation

SimY4
Copy link
Contributor

@SimY4 SimY4 commented Aug 29, 2023

No description provided.

@@ -27,7 +28,8 @@
public class ObjectMappedTest {
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
{
OBJECT_MAPPER.registerModule(new GuavaModule());
OBJECT_MAPPER.registerModule(new GuavaModule())
.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make serialization stable between JDK8 and JDK9+.

check(coll.ints()).hasContentInAnyOrder(1, 2, 3, 4, 5, 6);
check(coll.navs()).hasContentInAnyOrder(3, 2, 1);
check(coll.ords()).hasContentInAnyOrder(4, 5, 6, 7, 8, 9);
check(coll.pols()).hasContentInAnyOrder(RetentionPolicy.RUNTIME);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make comparisons stable between JDK8 and JDK9+.
isOf was taking verifying elements is exact order

@SimY4
Copy link
Contributor Author

SimY4 commented Aug 29, 2023

Hang on, let me check something

@SimY4
Copy link
Contributor Author

SimY4 commented Aug 29, 2023

Good to go. 👍

@SimY4 SimY4 force-pushed the topic/re-enable-jdk9-collections branch from 5f673b7 to b9df716 Compare August 29, 2023 05:23
@SimY4
Copy link
Contributor Author

SimY4 commented Sep 12, 2023

@elucash @asereda-gs may I bring your attention to this one? It re-enables JDK9 collections use.

@elucash
Copy link
Member

elucash commented Sep 22, 2023

@SimY4 thank you for the PR! sorry for the late response, usual cycle of work/business-trip/in-the-bed-with-flu etc. While I think that we can re-enable JDK9 support (way overdue, right), it's still somewhat of a breaking change, unfortunately: those subtleties with Map/Set ordering and null elements. Can we add a style flag (sigh... not happy about it either) and use it in isGenerateJdk9() ?

@elucash elucash merged commit 3f85a42 into immutables:master Sep 23, 2023
16 checks passed
@SimY4 SimY4 deleted the topic/re-enable-jdk9-collections branch September 24, 2023 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants