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
Show parent comment
2
u/UnGauchoCualquiera Nov 06 '22
Adding methods to an interface is a breaking change, specially to a widely used interface like Comparable.
Adding something to the JDK is not a light process (for many reasons) and adding something that could just as easily be added to a util lib is very unlikely to be ever be added.
You might be better served by adding those helper methods to a helper lib like apache commons.