--- a/jdk/src/java.base/share/classes/java/lang/Double.java Mon Apr 18 20:58:30 2016 +0100
+++ b/jdk/src/java.base/share/classes/java/lang/Double.java Mon Apr 18 14:10:14 2016 -0700
@@ -589,7 +589,13 @@
* represents the primitive {@code double} argument.
*
* @param value the value to be represented by the {@code Double}.
+ *
+ * @deprecated
+ * It is rarely appropriate to use this constructor. The static factory
+ * {@link #valueOf(double)} is generally a better choice, as it is
+ * likely to yield significantly better space and time performance.
*/
+ @Deprecated(since="9")
public Double(double value) {
this.value = value;
}
@@ -601,10 +607,16 @@
* {@code double} value as if by the {@code valueOf} method.
*
* @param s a string to be converted to a {@code Double}.
- * @throws NumberFormatException if the string does not contain a
+ * @throws NumberFormatException if the string does not contain a
* parsable number.
- * @see java.lang.Double#valueOf(java.lang.String)
+ *
+ * @deprecated
+ * It is rarely appropriate to use this constructor.
+ * Use {@link #parseDouble(String)} to convert a string to a
+ * {@code double} primitive, or use {@link #valueOf(String)}
+ * to convert a string to a {@code Double} object.
*/
+ @Deprecated(since="9")
public Double(String s) throws NumberFormatException {
value = parseDouble(s);
}