CodePage.getCodePageByClass sometimes gives ClassNotFoundException from Maven
schaloner-kbc opened this issue · 3 comments
When running a Maven build of a project, a ClassNotFoundException is thrown when a custom codepage is used. Through debugging, it can be seen this is linked to the classloader used by Class.forName(String) not having visibility of the requested class. By specifying a classloader to use, this can be avoided.
To Reproduce
Tricky. While this is happening consistently in Maven builds on both Mac and Windows, I can't reproduce it in the tests here. The associated pull request has updated how an instance of the class is obtained, and all existing tests still pass.
Expected behaviour
A custom CodePage instance should be created.
Additional context
Interestingly, this issue does not occur when the tests are run from IntelliJ.
Interesting. Will take a look.
Thanks for the PR! Releasing 2.0.7
which contains the fix...
Thanks!