[
https://issues.apache.org/jira/browse/OPENNLP-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17653181#comment-17653181
]
ASF GitHub Bot commented on OPENNLP-1381:
-----------------------------------------
rzo1 opened a new pull request, #475:
URL: https://github.com/apache/opennlp/pull/475
# What does this PR do?
- Adds a build profile for JDK 18+, which allows the use of the
`SecurityManager` via `-Djava.security.manager=allow`. Sadly, there is no
replacement available yet. Other people deal with similar issues like in
picocli: https://github.com/remkop/picocli/issues/1503 - at the moment, it
seems to be best to workaround the issue until the community finds proper
solutions to deal with a (new?) SDK API to deal with it.
-
- Adds Java 17, 18, 19 to the GitHub actions matrix build to ensure, that we
are buildable (and testable) with new Java versions.
### For all changes:
- [x] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
- [x] Does your PR title start with OPENNLP-XXXX where XXXX is the JIRA
number you are trying to resolve? Pay particular attention to the hyphen "-"
character.
- [x] Has your PR been rebased against the latest commit within the target
branch (typically main)?
- [x] Is your initial contribution a single, squashed commit?
### For code changes:
- [x] Have you ensured that the full suite of tests is executed via mvn
clean install at the root opennlp folder?
- [ ] Have you written or updated unit tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the LICENSE file, including the main
LICENSE file in opennlp folder?
- [ ] If applicable, have you updated the NOTICE file, including the main
NOTICE file found in opennlp folder?
### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in which
it is rendered?
### Note:
Please ensure that once the PR is submitted, you check GitHub Actions for
build issues and submit an update to your PR as soon as possible.
> OpenJDK 18+: CLITest fails with java.lang.UnsupportedOperationException: The
> Security Manager is deprecated and will be removed in a future release
> ---------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: OPENNLP-1381
> URL: https://issues.apache.org/jira/browse/OPENNLP-1381
> Project: OpenNLP
> Issue Type: Bug
> Components: Command Line Interface
> Affects Versions: 2.1.0
> Environment: MacOS Monterey 12.5 Intel (same issue in M1 chip)
> brew-installed OpenJDK 18.0.2
> Reporter: Bertrand Rigaldies
> Assignee: Richard Zowalla
> Priority: Major
> Fix For: 2.1.1
>
> Attachments: Screen Shot 2022-07-31 at 9.10.48 PM.png, Screen Shot
> 2022-07-31 at 9.11.09 PM.png
>
>
> As of OpenJDK 18, the Security Manager has been deprecated (see
> [JEP-411|https://openjdk.org/jeps/411] which fails all tests in CLITest.java:
> java.lang.UnsupportedOperationException: The Security Manager is deprecated
> and will be removed in a future release
> at java.base/java.lang.System.setSecurityManager(System.java:416)
> at
> opennlp.tools.cmdline.CLITest.installNoExitSecurityManager(CLITest.java:66)
> at
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
> at java.base/java.lang.reflect.Method.invoke(Method.java:577)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
> at
> org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
> at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
> at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
> at
> org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
> at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
> at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
> at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> at
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> at
> com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
> at
> com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
> at
> com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
> at
> com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
> at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)