Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow security managers to prevent system property access for Indy #119

Conversation

pickypg
Copy link
Contributor

@pickypg pickypg commented Sep 17, 2015

When using the "indy" setting, it tries to read a system property to enable logging.

This change enables a JVM Security Manager to block this setting and therefore simply ignore the setting to use the default: do not log.

From a security manager, you might otherwise catch a SecurityException containing:

access denied ("java.util.PropertyPermission" "groovy.indy.logging" "read")

Not only is this not recoverable, but the IndyInterface class will be inaccessible thereafter due to it being in a static block that fails (the dreaded NoClassDefFoundError).

@PascalSchumacher
Copy link
Contributor

@pickypg Thanks for this pull request. I created https://issues.apache.org/jira/browse/GROOVY-7626 to track this.

@PascalSchumacher
Copy link
Contributor

Thanks for the pull request. :)

Sorry for taking so long to merge. :(

The fix will be in the next release (2.4.6).

asfgit pushed a commit that referenced this pull request Dec 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants