review request 8006139, add missing methods to javax.sql.rowset.serial.SQLInput/OutputImpl
Remi Forax
forax at univ-mlv.fr
Sun Jan 13 12:33:35 UTC 2013
On 01/13/2013 01:24 PM, Lance @ Oracle wrote:
> On Jan 13, 2013, at 5:56 AM, Ulf Zibis <Ulf.Zibis at CoSoCo.de> wrote:
>
>> Am 12.01.2013 22:56, schrieb Lance Andersen - Oracle:
>>> Hi
>>> This is a review request for 8006139 which adds missing methods to SQLInput/Output
>>>
>>> The webrev can be found at http://cr.openjdk.java.net/~lancea/8006139/webrev.00/
>> Hi,
>>
>> are you paid by code lines ;-)
>> Additionally you have left out one opportunity
>> ... or is it new code style, having 2 wrong indented closing braces in one line?
>>
> Yes I should have caught that and will fix
>> I would code:
>>
>> 811 public String readNString() throws SQLException {
>> 812 String attrib = (String)getNextAttribute();
>> 813 lastValueWasNull =attrib == null;
>> 814return attrib;
>> 815 }
>>
>> Additionally I'm wondering, whether getNextAttribute() could be generified.
> Yes it probably could however I do no want to do this as part of this change
I disagree, it should not be generified, getNextAttribute() should
return Object and be casted at callsite,
it will more clear if a ClassCastException occurs.
Relying on inference to ask the compiler to insert the cast is dubious,
>> -Ulf
>>
Rémi
More information about the core-libs-dev
mailing list