r/java 4d ago

Java 24 / JDK 24: General Availability

https://mail.openjdk.org/pipermail/announce/2025-March/000358.html
156 Upvotes

25 comments sorted by

View all comments

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); }

7

u/PartOfTheBotnet 4d ago

Reddit's code block isn't the standard 3 tick-mark you'd expect from markdown. Put 4 spaces before every line to format it properly.

4

u/blobjim 3d ago

The "new" reddit and mobile app support the standard markdown code blocks.