You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
private static final Cloner CLONER = Cloner.standard();
static {
try {
var list = List.of(1);
var field = list.getClass().getDeclaredField("e1");
field.setAccessible(true);
var value = field.get(list);
if (value != null) {
CLONER.registerConstant(value);
}
} catch (Exception e) {
// ignore
}
}
I can confirm. It should rather be fixed by adding a custom IFastCloner, like in FastClonerArrayList.
In Cloner.registerFastCloners(), you can register those custom cloner.
In JDK15 changed default implementation for
List.of()
andSet.of()
methods.So, cloner returned invalid result.
Steps to reproduce
Execute this JAVA code on JDK14 and JDK15
In JDK
Problem in internal
EMPTY
value - library cloned it ine1
field.The text was updated successfully, but these errors were encountered: