--- old/src/java.base/share/classes/java/lang/Boolean.java 2016-04-13 18:42:45.000000000 -0700 +++ new/src/java.base/share/classes/java/lang/Boolean.java 2016-04-13 18:42:45.000000000 -0700 @@ -79,13 +79,16 @@ * Allocates a {@code Boolean} object representing the * {@code value} argument. * - *
Note: It is rarely appropriate to use this constructor. - * Unless a new instance is required, the static factory - * {@link #valueOf(boolean)} is generally a better choice. It is - * likely to yield significantly better space and time performance. - * * @param value the value of the {@code Boolean}. + * + * @deprecated + * It is rarely appropriate to use this constructor. The static factory + * {@link #valueOf(boolean)} is generally a better choice, as it is + * likely to yield significantly better space and time performance. + * Also consider using the final fields {@link #TRUE} and {@link #FALSE} + * if possible. */ + @Deprecated(since="9") public Boolean(boolean value) { this.value = value; } @@ -94,15 +97,18 @@ * Allocates a {@code Boolean} object representing the value * {@code true} if the string argument is not {@code null} * and is equal, ignoring case, to the string {@code "true"}. - * Otherwise, allocate a {@code Boolean} object representing the - * value {@code false}. Examples:
- * {@code new Boolean("True")} produces a {@code Boolean} object
- * that represents {@code true}.
- * {@code new Boolean("yes")} produces a {@code Boolean} object
- * that represents {@code false}.
+ * Otherwise, allocates a {@code Boolean} object representing the
+ * value {@code false}.
*
* @param s the string to be converted to a {@code Boolean}.
+ *
+ * @deprecated
+ * It is rarely appropriate to use this constructor.
+ * Use {@link #parseBoolean(String)} to convert a string to a
+ * {@code boolean} primitive, or use {@link #valueOf(String)}
+ * to convert a string to a {@code Boolean} object.
*/
+ @Deprecated(since="9")
public Boolean(String s) {
this(parseBoolean(s));
}