[
https://issues.apache.org/jira/browse/DERBY-7126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17446072#comment-17446072
]
Richard N. Hillegas commented on DERBY-7126:
--------------------------------------------
My naive attempt to workaround the new hurdle introduced by JDK 18 was to
programatically set the "java.security.manager" property just before calling
System.setSecurityManager()--as we do with the other properties related to the
SecurityManager. Unfortunately, this does not allow the SecurityManager to be
installed. However, if I set that property on the boot command line, then the
SecurityManager can be installed. I have attached a simple program
(DERBY_7126_B), which demonstrates this behavior.
Here is the output from running the program against JDK 18 WITHOUT setting
"java.security.manager":
{noformat}
mainline (18) > java DERBY_7126_B
Exception in thread "main" 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:411)
at DERBY_7126_B.main(DERBY_7126_B.java:34)
{noformat}
And here is the output from running the program against JDK 18 and setting
"java.security.manager" on the boot command line:
{noformat}
mainline (18) > java -Djava.security.manager=allow DERBY_7126_B
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by DERBY_7126_B
(file:/Users/rhillegas/src/)
WARNING: Please consider reporting this to the maintainers of DERBY_7126_B
WARNING: System::setSecurityManager will be removed in a future release
{noformat}
Looks like another trip to the Open JDK security mailing list is in order.
> Make it possible to build and test Derby cleanly with OpenJDK 18
> ----------------------------------------------------------------
>
> Key: DERBY-7126
> URL: https://issues.apache.org/jira/browse/DERBY-7126
> Project: Derby
> Issue Type: Task
> Components: Build tools
> Affects Versions: 10.16.0.0
> Reporter: Richard N. Hillegas
> Assignee: Richard N. Hillegas
> Priority: Major
> Attachments: DERBY_7126_A.java, DERBY_7126_B.java, dcl_emc2sm.jar,
> derby-7126-01-aa-regenerateSignedJars.diff,
> derby-7126-02-aa-suppressDeprecationWarnings.diff
>
>
> Releases of Open JDK 18 can be found at https://jdk.java.net/178. We should
> adjust Derby as necessary so that it builds cleanly (including javadoc) and
> tests cleanly with this version of the platform.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)