Re: RFR 8226808: PreparedStatement javadoc typo

2019-07-26 Thread Brian Burkhalter
++1

Brian

> On Jul 26, 2019, at 11:29 AM, Joe Wang  wrote:
> 
> +1, and +1 for the salary at the time of JDK 1.1 ;-)
> 
> -Joe
> 
> On 7/26/19 11:17 AM, Lance Andersen wrote:
>> Hi all,
>> 
>> Please review this trivial change for JDK-8226808 which corrects a javadoc 
>> error that dates back to JDK 1.1 where the example for BigDecimal is not 
>> correct:
>> 
>> —
>> $ hg diff
>> diff -r 550a1a6ca596 
>> src/java.sql/share/classes/java/sql/PreparedStatement.java
>> --- a/src/java.sql/share/classes/java/sql/PreparedStatement.javaFri 
>> Jul 26 17:15:17 2019 +
>> +++ b/src/java.sql/share/classes/java/sql/PreparedStatement.javaFri 
>> Jul 26 14:13:09 2019 -0400
>> @@ -47,12 +47,13 @@
>>   * 
>>   * In the following example of setting a parameter, con 
>> represents
>>   * an active connection:
>> - * 
>> + * {@code
>> + *   BigDecimal sal = new BigDecimal("153833.00");
>>   *   PreparedStatement pstmt = con.prepareStatement("UPDATE EMPLOYEES
>>   * SET SALARY = ? WHERE ID = ?");
>> - *   pstmt.setBigDecimal(1, 153833.00)
>> - *   pstmt.setInt(2, 110592)
>> - * 
>> + *   pstmt.setBigDecimal(1, sal);
>> + *   pstmt.setInt(2, 110592);
>> + * }
>>   *
>>   * @see Connection#prepareStatement
>>   * @see ResultSet
>> ljanders-mac:open ljanders$
>> ———
>> 
>> Best,
>> Lance
>>  
>>   
>> 
>>  Lance Andersen| 
>> Principal Member of Technical Staff | +1.781.442.2037
>> Oracle Java Engineering
>> 1 Network Drive
>> Burlington, MA 01803
>> lance.ander...@oracle.com 
>> 
>> 
>> 
> 



RFR 8226808: PreparedStatement javadoc typo

2019-07-26 Thread Lance Andersen
Hi all,

Please review this trivial change for JDK-8226808 which corrects a javadoc 
error that dates back to JDK 1.1 where the example for BigDecimal is not 
correct:

—
$ hg diff
diff -r 550a1a6ca596 src/java.sql/share/classes/java/sql/PreparedStatement.java
--- a/src/java.sql/share/classes/java/sql/PreparedStatement.javaFri Jul 
26 17:15:17 2019 +
+++ b/src/java.sql/share/classes/java/sql/PreparedStatement.javaFri Jul 
26 14:13:09 2019 -0400
@@ -47,12 +47,13 @@
  * 
  * In the following example of setting a parameter, con represents
  * an active connection:
- * 
+ * {@code
+ *   BigDecimal sal = new BigDecimal("153833.00");
  *   PreparedStatement pstmt = con.prepareStatement("UPDATE EMPLOYEES
  * SET SALARY = ? WHERE ID = ?");
- *   pstmt.setBigDecimal(1, 153833.00)
- *   pstmt.setInt(2, 110592)
- * 
+ *   pstmt.setBigDecimal(1, sal);
+ *   pstmt.setInt(2, 110592);
+ * }
  *
  * @see Connection#prepareStatement
  * @see ResultSet
ljanders-mac:open ljanders$
———

Best,
Lance
 
  

 Lance Andersen| 
Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
lance.ander...@oracle.com