Code completion and a lazy developer
(Integer) Integer.getInteger("12345")
Wow, that a nice stupid code. I lost 1 hour because of it. Thanks to YOU! The static Integer.getInteger(String) method return the value of a SYSTEM, I repeat a SYSTEM, property as an Integer. Hey! Lazy developers, read the javadoc before code completion.
Use this instead:
(Integer) Integer.valueOf(String)
or
No comments:
Post a Comment