United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4941777 : Deprecate Boolean constructor

Details
Type:
Enhancement
Submit Date:
2003-10-22
Status:
Open
Updated Date:
2010-11-30
Project Name:
JDK
Resolved Date:
Component:
core-libs
OS:
generic,windows_xp
Sub-Component:
java.lang
CPU:
x86,generic
Priority:
P3
Resolution:
Unresolved
Affected Versions:
1.4.2,6
Targeted Versions:
8

Related Reports
Relates:
Relates:
Relates:

Sub Tasks

Description
Name: tb29552			Date: 10/22/2003


A DESCRIPTION OF THE REQUEST :
We should encourage people to move from "new Boolean()" to Boolean.TRUE, Boolean.FALSE by deprecating the constructor and documented the aforementioned alternative methods.

JUSTIFICATION :
Using Boolean.TRUE, Boolean.FALSE leads to improved performance, reduced memory footprint. Many developers are unaware of this recent addition and continue to use the constructor. A deprecation should formalize this migration route.
(Review ID: 216908) 
======================================================================

                                    

Comments
EVALUATION

Contribution-Forum:https://jdk-collaboration.dev.java.net/servlets/ProjectForumMessageView?messageID=12004&forumID=1463
                                     
2006-03-15
EVALUATION

Due to the disruption deprecating an API can have, currently an API has to be "actively hazardous" to be deprecated, like Thread.stop.  While the use this constructor is certainly ill-advised, it doesn't rise (or sink) to the standard of hazardousness to be deprecated in the JDK.  In the future we may add a "denigration" facility to mark API elements that aren't quite so bad that they should be deprecated, but shouldn't be used in most cases.  This constructor would be a good candidate for denigration.
                                     
2005-11-15
PUBLIC COMMENTS

.
                                     
2004-06-10
EVALUATION

A reasonable request; the JavaDoc already encourages use of the static factory.

###@###.### 2003-10-30
                                     
2003-10-30



Hardware and Software, Engineered to Work Together