jdk/src/java.base/share/classes/java/lang/Long.java
changeset 37521 b6e0f285c998
parent 35707 66cdb7e01a3e
child 37877 dae28a12fb38
--- a/jdk/src/java.base/share/classes/java/lang/Long.java	Mon Apr 18 20:58:30 2016 +0100
+++ b/jdk/src/java.base/share/classes/java/lang/Long.java	Mon Apr 18 14:10:14 2016 -0700
@@ -1340,7 +1340,13 @@
      *
      * @param   value   the value to be represented by the
      *          {@code Long} object.
+     *
+     * @deprecated
+     * It is rarely appropriate to use this constructor. The static factory
+     * {@link #valueOf(long)} is generally a better choice, as it is
+     * likely to yield significantly better space and time performance.
      */
+    @Deprecated(since="9")
     public Long(long value) {
         this.value = value;
     }
@@ -1356,8 +1362,14 @@
      *             {@code Long}.
      * @throws     NumberFormatException  if the {@code String} does not
      *             contain a parsable {@code long}.
-     * @see        java.lang.Long#parseLong(java.lang.String, int)
+     *
+     * @deprecated
+     * It is rarely appropriate to use this constructor.
+     * Use {@link #parseLong(String)} to convert a string to a
+     * {@code long} primitive, or use {@link #valueOf(String)}
+     * to convert a string to a {@code Long} object.
      */
+    @Deprecated(since="9")
     public Long(String s) throws NumberFormatException {
         this.value = parseLong(s, 10);
     }