RFR: 8180728: DatabaseMeta.getRowIdLifetime returns an enum but javadoc refers to int
Lance Andersen
lance.andersen at oracle.com
Tue May 23 17:10:27 UTC 2017
Hi Roger,
> On May 23, 2017, at 9:56 AM, Roger Riggs <Roger.Riggs at oracle.com> wrote:
>
> Hi Lance,
>
> Should one of those @code's be @link so it is easy to get to the ROWID javadoc?
I could or add an @see.
I will tweak it before I push
thank you.
>
> Otherwise, looks fine,
>
> Roger
>
>
> On 5/23/2017 7:21 AM, Lance Andersen wrote:
>> Hi all,
>>
>> This RFR addresses a javadoc bug dating back to Java SE 6/JDBC 4.0 for DatabaseMetadata.getRowIdLifetime which refers to an int being returned but in actuality an enum is returned. The javadoc no aligns with the PDF JDBC spec.
>>
>> The CCC has been approved.
>>
>> ——————————————
>> $ hg diff
>> diff -r 490393b435bb src/java.sql/share/classes/java/sql/DatabaseMetaData.java
>> --- a/src/java.sql/share/classes/java/sql/DatabaseMetaData.java Sun May 21 10:52:36 2017 +0200
>> +++ b/src/java.sql/share/classes/java/sql/DatabaseMetaData.java Tue May 23 07:20:07 2017 -0400
>> @@ -1,5 +1,5 @@
>> /*
>> - * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
>> + * Copyright (c) 1996, 2017, 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
>> @@ -3199,22 +3199,10 @@
>> //------------------------- JDBC 4.0 -----------------------------------
>> /**
>> - * Indicates whether or not this data source supports the SQL <code>ROWID</code> type,
>> - * and if so the lifetime for which a <code>RowId</code> object remains valid.
>> - * <p>
>> - * The returned int values have the following relationship:
>> - * <pre>{@code
>> - * ROWID_UNSUPPORTED < ROWID_VALID_OTHER < ROWID_VALID_TRANSACTION
>> - * < ROWID_VALID_SESSION < ROWID_VALID_FOREVER
>> - * }</pre>
>> - * so conditional logic such as
>> - * <pre>{@code
>> - * if (metadata.getRowIdLifetime() > DatabaseMetaData.ROWID_VALID_TRANSACTION)
>> - * }</pre>
>> - * can be used. Valid Forever means valid across all Sessions, and valid for
>> - * a Session means valid across all its contained Transactions.
>> + * Indicates whether this data source supports the SQL {@code ROWID} type,
>> + * and the lifetime for which a {@code RowId} object remains valid.
>> *
>> - * @return the status indicating the lifetime of a <code>RowId</code>
>> + * @return the status indicating the lifetime of a {@code RowId}
>> * @throws SQLException if a database access error occurs
>> * @since 1.6
>> */
>> ——————————————
>> Best
>> Lance
>> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
>> <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
>> <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
>> Oracle Java Engineering
>> 1 Network Drive
>> Burlington, MA 01803
>> Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>
>>
>>
>>
>
<http://oracle.com/us/design/oracle-email-sig-198324.gif>
<http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
<http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering
1 Network Drive
Burlington, MA 01803
Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>
More information about the core-libs-dev
mailing list