Name: dbT83986 Date: 01/26/99
(1) Boolean.valueOf(String) returns a new Boolean object instead of
returning one of the predefined versions, Boolean.TRUE or Boolean.FALSE.
(2) Boolean.toBoolean(String) could use String.equalsIgnoreCase()
instead of String.toLowercase() and String.equals().
(Review ID: 33327)
======================================================================
Name: krT82822 Date: 08/09/99
Currently, the Boolean.valueOf(String) method always produces a
new object. This behavior is wasteful of resources. It should be
redesigned to return Boolean.TRUE or Boolean.FALSE as the case
demands. This is not a terribly important improvement, buts its
completely safe and every little bit helps.
(bug # 4206052 includes a comment about valueOf(), but doesn't explicitly comment on the inefficiency issue)
(Review ID: 93694)
======================================================================
- duplicates
-
JDK-4286410 Boolean.for(boolean aTrueOrFalseIntrinsic)
- Closed