[
https://issues.apache.org/jira/browse/LANG-1785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18016753#comment-18016753
]
Robin Jansohn commented on LANG-1785:
-------------------------------------
I was able to remove the usage of {{Strings.CS.removeEnd()}} as it was only
used for path handling which could better be solved with java.nio.Path API.
Second workaround would be to stay on the deprecated
{{StringUtils.removeEnd()}} for now...
I'll try to come up with a reproducer but my time is limited at the moment and
it does need a bit of effort to actually run it (valid certificate to sign
JARs, install Karakun OpenWebStart, ...).
> IllegalAccessError when running in JNLP context
> -----------------------------------------------
>
> Key: LANG-1785
> URL: https://issues.apache.org/jira/browse/LANG-1785
> Project: Commons Lang
> Issue Type: Bug
> Affects Versions: 3.18.0
> Reporter: Robin Jansohn
> Priority: Major
>
> I'm getting the following exception when running my OpenJFX application with
> the latest lang3 version in a JNLP context (IcedTea-Web):
> {noformat}
> Caused by: java.lang.IllegalAccessError: class
> org.apache.commons.lang3.Strings tried to access method 'boolean
> org.apache.commons.lang3.CharSequenceUtils.regionMatches(java.lang.CharSequence,
> boolean, int, java.lang.CharSequence, int, int)'
> (org.apache.commons.lang3.Strings is in unnamed module of loader
> net.sourceforge.jnlp.runtime.classloader.JNLPClassLoader @4bd10202;
> org.apache.commons.lang3.CharSequenceUtils is in unnamed module of loader
> 'bootstrap')
> at org.apache.commons.lang3.Strings.endsWith(Strings.java:606)
> at org.apache.commons.lang3.Strings.removeEnd(Strings.java:1142)
> {noformat}
> Anyone seen something like this before?
> This only occurs if I use the new {{Strings.CS.removeEnd(...)}} but not with
> the deprecated {{StringUtils.removeEnd(...)}}.
> I can workaround the issue so it is not a huge deal. Still would be
> interesting to know if someone could explain what is causing this and if
> there is something which should get fixed here...
--
This message was sent by Atlassian Jira
(v8.20.10#820010)