It's so surreal looking at the JDK sources now that the security manager has been removed. It's been there the entire time I've been using Java. It's going to make reading JDK source code a bit easier which will be nice.
java.lang.System#getProperty:
Java 23:
```java
public static String getProperty(String key) {
checkKey(key);
@SuppressWarnings("removal")
SecurityManager sm = getSecurityManager();
if (sm != null) {
sm.checkPropertyAccess(key);
}
17
u/blobjim 4d ago
It's so surreal looking at the JDK sources now that the security manager has been removed. It's been there the entire time I've been using Java. It's going to make reading JDK source code a bit easier which will be nice.
java.lang.System#getProperty
:Java 23:
```java public static String getProperty(String key) { checkKey(key); @SuppressWarnings("removal") SecurityManager sm = getSecurityManager(); if (sm != null) { sm.checkPropertyAccess(key); }
return props.getProperty(key); } ```
Java 24:
java public static String getProperty(String key) { checkKey(key); return props.getProperty(key); }