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

fix the issue #103 by create two new FastCloners #109

Merged
merged 10 commits into from
Aug 4, 2021

Conversation

ZhenXiongQian
Copy link
Contributor

To fix issue #103
In jdk 5, cloner.deepClone(Set.of(1)).size() will be 2 because EMPTY( it is null in jdk14 ) will be changed with clone. So it has to create new FastCloner.

Copy link
Contributor

@tweimer tweimer left a comment

Choose a reason for hiding this comment

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

That is wrong, you must also clone the elements of the lists.

@ZhenXiongQian
Copy link
Contributor Author

ok, I change the code to use cloner.deepClone

@ZhenXiongQian
Copy link
Contributor Author

@tweimer is this pr ok now?

@tweimer
Copy link
Contributor

tweimer commented Jul 31, 2021

See my comment in the review. A test for both cloners with two elements would be useful,for the sake of completeness.

@ZhenXiongQian
Copy link
Contributor Author

the test cases are now complete

@tweimer
Copy link
Contributor

tweimer commented Aug 3, 2021

Like good to me.

@kostaskougios has to merge it

@kostaskougios kostaskougios merged commit 9b33bdb into kostaskougios:master Aug 4, 2021
@kostaskougios
Copy link
Owner

👍

@chadlwilson
Copy link

Assuming you feel this is stable at this stage, any chance of cutting another release @kostaskougios and @tweimer ?

@atribemc
Copy link

atribemc commented Apr 5, 2022

Any chance of 1.11.0 making it to maven central so i can get this fix?

@chadlwilson
Copy link

@atribemc Seems unlikely based on #105 (comment)

I did start to consider maintaining/releasing a fork at https://github.com/chadlwilson/cloning but haven't pushed it anywhere yet/set up automation, as for my use case we had our own fast cloners for the issue in this PR and we needed --add-opens anyway making the other unreleased Java 16 fixes not so relevant.

I'm not sure if any other possible fork candidates have emerged...

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.

5 participants