Description
Wrapper classes for the Java primitives (Boolean, Byte, Short, Character, Integer, Long, Float, Double) have constructors which will always create new objects. These constructors are officially deprecated as of Java 9 and it is recommended to use the public static methods since these can reuse the same underlying objects. In 99% of cases we should be doing this, so these constructors should be added to forbiddenapis and code corrected to use autoboxing or call the static methods (.valueOf, .parse*) explicitly.
Attachments
Issue Links
- links to