kotlin
                                
                                 kotlin copied to clipboard
                                
                                    kotlin copied to clipboard
                            
                            
                            
                        KT-52071 Fallback if Security Manager blocks reading system properties
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.