You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2022/05/02 01:08:00 UTC

[jira] [Resolved] (GROOVY-10610) Provide a better fallback for running without a security manager for groovysh on JDK18

     [ https://issues.apache.org/jira/browse/GROOVY-10610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King resolved GROOVY-10610.
--------------------------------
    Fix Version/s: 5.0.0-alpha-1
                   4.0.3
       Resolution: Fixed

Proposed PR merged.

> Provide a better fallback for running without a security manager for groovysh on JDK18
> --------------------------------------------------------------------------------------
>
>                 Key: GROOVY-10610
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10610
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>             Fix For: 5.0.0-alpha-1, 4.0.3
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When running {{groovysh}} on JDK18 and above, the use of the security manager to prohibit calling System.exit() needs to be explicitly enabled by setting {{java.security.manager}} to {{allow}}.
> Previously, when setting that property, {{groovysh}} runs (with an expected WARNING) and guards against attempts to call System.exit(). This behavior is unchanged by this issue.
> Previously, when that property is not set, {{groovysh}} won't start and instead fails with an UnsupportedOperationException. This issue changes the behavior when the property is not set to not attempt to use the NoExitSecurityManager. Instead, {{groovysh}} starts but attempts to call System.exit() cause {{groovysh}} to immediately exit.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)