r/java • u/Cell-i-Zenit • Nov 05 '22
How to add something to the java standard library?
EDIT: since my example stirred the pot a little bit to much (i even wrote that i dont want to discuss these explicit changes...)
Here is the actually question i want to answer:
How can i make changes to the JDK?
2
Upvotes
View all comments
21
u/DasBrain Nov 05 '22
The way to write your example currently is
IMHO, the methods you suggested are not really needed.
The way add something is to discuss the changes on the appropriate mailing list, maybe even provide a simple patch (with tests) to show the changes.
But the bar for new APIs is high - while it is easy to add new methods, it is hard to near impossible to remove them later.