kostaskougios / cloning

deep clone java objects
Other
591 stars 112 forks source link

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

Closed ZhenXiongQian closed 3 years ago

ZhenXiongQian commented 3 years ago

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.

ZhenXiongQian commented 3 years ago

ok, I change the code to use cloner.deepClone

ZhenXiongQian commented 3 years ago

@tweimer is this pr ok now?

tweimer commented 3 years ago

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

ZhenXiongQian commented 3 years ago

the test cases are now complete

tweimer commented 3 years ago

Like good to me.

@kostaskougios has to merge it

kostaskougios commented 3 years ago

:+1:

chadlwilson commented 3 years ago

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

atribemc commented 2 years ago

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

chadlwilson commented 2 years ago

@atribemc Seems unlikely based on https://github.com/kostaskougios/cloning/issues/105#issuecomment-978225059

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...