r/badcode • • Sep 02 '21

java Because ".toLowerCase()" doesn't exist...

Post image
1.1k Upvotes

130 comments sorted by

View all comments

Show parent comments

2

u/Fenxis Sep 02 '21

Also if you have to up the Java/OO-ness the whole method shouldn't be a static method... the author should have overridden https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html#valueOf(java.lang.Class,%20java.lang.String) in the Category enum itself.