Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-10610

Provide a better fallback for running without a security manager for groovysh on JDK18

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.3
    • None
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              paulk Paul King
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m