Open johnpoth opened 7 years ago
Yeah..Stephane Landelle reported this a few years ago. :) Then they added Unsafe back and then they took it out again. I guess it is time to fix it. I will try a fix that keeps perf for 1.8 but loses it only for 1.9. Thanks for reminding me. I am a bit under water now. But I will try to take a poke by end of May. BTW I accept PRs. :)
Any update on this issue?
Guess this project is dead.
@RichardHightower Are you going to let this project die because of this issue?
any update... or should I assume the project is dead?
for JDK 9 (9.0.4+11) I get;
Caused by: java.lang.ClassCastException: [B cannot be cast to [C
at org.boon.core.reflection.FastStringUtils$StringImplementation$1.toCharArray(FastStringUtils.java:92)
for JDK 10 (10.0.2+13) I get;
Caused by: java.lang.ClassCastException: [B cannot be cast to [C
at org.boon.core.reflection.FastStringUtils$StringImplementation$1.toCharArray(FastStringUtils.java:92)
for JDK 11 (11.0.2+9) I get;
Caused by: java.lang.ClassCastException: class [B cannot be cast to class [C ([B and [C are in module java.base of loader 'bootstrap')
at org.boon.core.reflection.FastStringUtils$StringImplementation$1.toCharArray(FastStringUtils.java:92)
for JDK 12 (12+33) I get;
Caused by: java.lang.ClassCastException: class [B cannot be cast to class [C ([B and [C are in module java.base of loader 'bootstrap')
at org.boon.core.reflection.FastStringUtils$StringImplementation$1.toCharArray(FastStringUtils.java:92)
for JDK 13 (13-ea+12) I get;
Caused by: java.lang.ClassCastException: class [B cannot be cast to class [C ([B and [C are in module java.base of loader 'bootstrap')
at org.boon.core.reflection.FastStringUtils$StringImplementation$1.toCharArray(FastStringUtils.java:92)
@nhojpatrick Apparently jackson now has the same performance as boon. I exchanged boon with jackson and have not been disappointed by now. The only thing I had to be aware of was to configure the mapper to work as expected (as boon works)
public static final ObjectMapper MAPPER = new ObjectMapper(){{
this.registerModule(new ParameterNamesModule());
this.setVisibility(FIELD, ANY);
this.setSerializationInclusion(JsonInclude.Include.NON_NULL);
this.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false);
this.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS,false);
this.configure(SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS,false);
}};
@RichardHightower do you will continue with boon and qbit?
We have a legacy system that was having this problem.
Using the system property:
-Dorg.boon.faststringutils.disable=true
...seemed to fix the problem.
The project currently fails on JDK 9:
To reproduce:
The above fails in Reflection.java's nested static initializers. I've traced the problem to org.boon.core.reflection.FastStringUtils#toCharArray(java.lang.String) which seem to rely on sun.misc.unsafe. To checkout a full fledged example, see BoonConcurrentTest but I don't think it's needed to illustrate the problem.
Thanks!