8169020: Add since element to JDBC deprecated methods
authorlancea
Thu, 03 Nov 2016 13:34:27 -0400
changeset 41889 54d1ff9312ce
parent 41888 dc533ef5583a
child 41890 ab67b8f4f2fe
8169020: Add since element to JDBC deprecated methods Reviewed-by: darcy
jdk/src/java.sql/share/classes/java/sql/CallableStatement.java
jdk/src/java.sql/share/classes/java/sql/Date.java
jdk/src/java.sql/share/classes/java/sql/DriverManager.java
jdk/src/java.sql/share/classes/java/sql/PreparedStatement.java
jdk/src/java.sql/share/classes/java/sql/ResultSet.java
jdk/src/java.sql/share/classes/java/sql/Time.java
jdk/src/java.sql/share/classes/java/sql/Timestamp.java
--- a/jdk/src/java.sql/share/classes/java/sql/CallableStatement.java	Thu Nov 03 12:29:05 2016 -0400
+++ b/jdk/src/java.sql/share/classes/java/sql/CallableStatement.java	Thu Nov 03 13:34:27 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -295,7 +295,7 @@
      *             or <code>getBigDecimal(String parameterName)</code>
      * @see #setBigDecimal
      */
-    @Deprecated
+    @Deprecated(since="1.2")
     BigDecimal getBigDecimal(int parameterIndex, int scale)
         throws SQLException;
 
--- a/jdk/src/java.sql/share/classes/java/sql/Date.java	Thu Nov 03 12:29:05 2016 -0400
+++ b/jdk/src/java.sql/share/classes/java/sql/Date.java	Thu Nov 03 13:34:27 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@
      * @param day 1 to 31
      * @deprecated instead use the constructor <code>Date(long date)</code>
      */
-    @Deprecated
+    @Deprecated(since="1.2")
     public Date(int year, int month, int day) {
         super(year, month, day);
     }
@@ -199,7 +199,7 @@
     * @exception java.lang.IllegalArgumentException if this method is invoked
     * @see #setHours
     */
-    @Deprecated
+    @Deprecated(since="1.2")
     public int getHours() {
         throw new java.lang.IllegalArgumentException();
     }
@@ -212,7 +212,7 @@
     * @exception java.lang.IllegalArgumentException if this method is invoked
     * @see #setMinutes
     */
-    @Deprecated
+    @Deprecated(since="1.2")
     public int getMinutes() {
         throw new java.lang.IllegalArgumentException();
     }
@@ -225,7 +225,7 @@
     * @exception java.lang.IllegalArgumentException if this method is invoked
     * @see #setSeconds
     */
-    @Deprecated
+    @Deprecated(since="1.2")
     public int getSeconds() {
         throw new java.lang.IllegalArgumentException();
     }
@@ -238,7 +238,7 @@
     * @exception java.lang.IllegalArgumentException if this method is invoked
     * @see #getHours
     */
-    @Deprecated
+    @Deprecated(since="1.2")
     public void setHours(int i) {
         throw new java.lang.IllegalArgumentException();
     }
@@ -251,7 +251,7 @@
     * @exception java.lang.IllegalArgumentException if this method is invoked
     * @see #getMinutes
     */
-    @Deprecated
+    @Deprecated(since="1.2")
     public void setMinutes(int i) {
         throw new java.lang.IllegalArgumentException();
     }
@@ -264,7 +264,7 @@
     * @exception java.lang.IllegalArgumentException if this method is invoked
     * @see #getSeconds
     */
-    @Deprecated
+    @Deprecated(since="1.2")
     public void setSeconds(int i) {
         throw new java.lang.IllegalArgumentException();
     }
--- a/jdk/src/java.sql/share/classes/java/sql/DriverManager.java	Thu Nov 03 12:29:05 2016 -0400
+++ b/jdk/src/java.sql/share/classes/java/sql/DriverManager.java	Thu Nov 03 13:34:27 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -515,7 +515,7 @@
      * @see SecurityManager#checkPermission
      * @see #getLogStream
      */
-    @Deprecated
+    @Deprecated(since="1.2")
     public static void setLogStream(java.io.PrintStream out) {
 
         SecurityManager sec = System.getSecurityManager();
@@ -538,7 +538,7 @@
      * @deprecated  Use {@code getLogWriter}
      * @see #setLogStream
      */
-    @Deprecated
+    @Deprecated(since="1.2")
     public static java.io.PrintStream getLogStream() {
         return logStream;
     }
--- a/jdk/src/java.sql/share/classes/java/sql/PreparedStatement.java	Thu Nov 03 12:29:05 2016 -0400
+++ b/jdk/src/java.sql/share/classes/java/sql/PreparedStatement.java	Thu Nov 03 13:34:27 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -344,7 +344,7 @@
      * this method
      * @deprecated Use {@code setCharacterStream}
      */
-    @Deprecated
+    @Deprecated(since="1.2")
     void setUnicodeStream(int parameterIndex, java.io.InputStream x,
                           int length) throws SQLException;
 
--- a/jdk/src/java.sql/share/classes/java/sql/ResultSet.java	Thu Nov 03 12:29:05 2016 -0400
+++ b/jdk/src/java.sql/share/classes/java/sql/ResultSet.java	Thu Nov 03 13:34:27 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -358,7 +358,7 @@
      * @deprecated Use {@code getBigDecimal(int columnIndex)}
      *             or {@code getBigDecimal(String columnLabel)}
      */
-    @Deprecated
+    @Deprecated(since="1.2")
     BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException;
 
     /**
@@ -478,7 +478,7 @@
      * @deprecated use <code>getCharacterStream</code> in place of
      *              <code>getUnicodeStream</code>
      */
-    @Deprecated
+    @Deprecated(since="1.2")
     java.io.InputStream getUnicodeStream(int columnIndex) throws SQLException;
 
     /**
@@ -646,7 +646,7 @@
      * @deprecated Use {@code getBigDecimal(int columnIndex)}
      *             or {@code getBigDecimal(String columnLabel)}
      */
-    @Deprecated
+    @Deprecated(since="1.2")
     BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException;
 
     /**
@@ -764,7 +764,7 @@
      * this method
      * @deprecated use <code>getCharacterStream</code> instead
      */
-    @Deprecated
+    @Deprecated(since="1.2")
     java.io.InputStream getUnicodeStream(String columnLabel) throws SQLException;
 
     /**
--- a/jdk/src/java.sql/share/classes/java/sql/Time.java	Thu Nov 03 12:29:05 2016 -0400
+++ b/jdk/src/java.sql/share/classes/java/sql/Time.java	Thu Nov 03 13:34:27 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -60,7 +60,7 @@
      * @deprecated Use the constructor that takes a milliseconds value
      *             in place of this constructor
      */
-    @Deprecated
+    @Deprecated(since="1.2")
     public Time(int hour, int minute, int second) {
         super(70, 0, 1, hour, minute, second);
     }
@@ -146,7 +146,7 @@
     *           method is invoked
     * @see #setYear
     */
-    @Deprecated
+    @Deprecated(since="1.2")
     public int getYear() {
         throw new java.lang.IllegalArgumentException();
     }
@@ -160,7 +160,7 @@
     *           method is invoked
     * @see #setMonth
     */
-    @Deprecated
+    @Deprecated(since="1.2")
     public int getMonth() {
         throw new java.lang.IllegalArgumentException();
     }
@@ -173,7 +173,7 @@
     * @exception java.lang.IllegalArgumentException if this
     *           method is invoked
     */
-    @Deprecated
+    @Deprecated(since="1.2")
     public int getDay() {
         throw new java.lang.IllegalArgumentException();
     }
@@ -187,7 +187,7 @@
     *           method is invoked
     * @see #setDate
     */
-    @Deprecated
+    @Deprecated(since="1.2")
     public int getDate() {
         throw new java.lang.IllegalArgumentException();
     }
@@ -201,7 +201,7 @@
     *           method is invoked
     * @see #getYear
     */
-    @Deprecated
+    @Deprecated(since="1.2")
     public void setYear(int i) {
         throw new java.lang.IllegalArgumentException();
     }
@@ -215,7 +215,7 @@
     *           method is invoked
     * @see #getMonth
     */
-    @Deprecated
+    @Deprecated(since="1.2")
     public void setMonth(int i) {
         throw new java.lang.IllegalArgumentException();
     }
@@ -229,7 +229,7 @@
     *           method is invoked
     * @see #getDate
     */
-    @Deprecated
+    @Deprecated(since="1.2")
     public void setDate(int i) {
         throw new java.lang.IllegalArgumentException();
     }
--- a/jdk/src/java.sql/share/classes/java/sql/Timestamp.java	Thu Nov 03 12:29:05 2016 -0400
+++ b/jdk/src/java.sql/share/classes/java/sql/Timestamp.java	Thu Nov 03 13:34:27 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -88,7 +88,7 @@
      * @deprecated instead use the constructor {@code Timestamp(long millis)}
      * @exception IllegalArgumentException if the nano argument is out of bounds
      */
-    @Deprecated
+    @Deprecated(since="1.2")
     public Timestamp(int year, int month, int date,
                      int hour, int minute, int second, int nano) {
         super(year, month, date, hour, minute, second);