Hi Oracle team,

I've just tested JDK 18-ea+23-1525 with Apache Wicket and I've faced the
following problem:

[ERROR] Tests run: 29, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:
0.125 s <<< FAILURE! - in org.apache.wicket.util.string.StringsTest
[ERROR] org.apache.wicket.util.string.StringsTest.stripJSessionId  Time
elapsed: 0.011 s  <<< ERROR!
java.lang.InternalError: java.lang.IllegalAccessException: static final
field has no write access:
org.apache.wicket.util.string.Strings.SESSION_ID_PARAM/java.lang.String/putStatic,
from class java.lang.Object (module java.base)
at
org.apache.wicket.util.string.StringsTest.stripJSessionId(StringsTest.java:73)
Caused by: java.lang.IllegalAccessException: static final field has no
write access:
org.apache.wicket.util.string.Strings.SESSION_ID_PARAM/java.lang.String/putStatic,
from class java.lang.Object (module java.base)
at
org.apache.wicket.util.string.StringsTest.stripJSessionId(StringsTest.java:73)

The related code could be seen at:
1)
https://github.com/apache/wicket/blob/d95a3c526229092ecc035ca3e901f5d9a7d4e1c2/wicket-util/src/main/java/org/apache/wicket/util/string/Strings.java#L66
2)
https://github.com/apache/wicket/blob/d95a3c526229092ecc035ca3e901f5d9a7d4e1c2/wicket-util/src/test/java/org/apache/wicket/util/string/StringsTest.java#L56-L70

The same code worked with JDK 18 b18 and older versions.
I believe the failure is caused by https://github.com/openjdk/jdk/pull/5027

Is this a regression or an intended new behavior and we should update our
code ?

Regards,
Martin

Reply via email to