kotlin icon indicating copy to clipboard operation
kotlin copied to clipboard

KT-52071 Fallback if Security Manager blocks reading system properties

Open karlrwjohnson opened this issue 3 years ago • 0 comments

This solves an issue I reported myself: https://youtrack.jetbrains.com/issue/KT-52071

Some environments still use the Java Security Manager (despite its impending deprecation). They're also likely to block reading unknown system variables.

If Kotlin isn't widely used in an organization, then reading kotlin.ignore.old.metadata will trigger an AccessControlException. In that case, the code should continue as if the variable is unset, not crash.

I've tested this change manually in my own environment, which has a Security Manager that blocks reading system variables.

karlrwjohnson avatar Jun 29 '22 16:06 karlrwjohnson