Review needed for 7132879 to address the findbug errors in CachedRowSetImpl, SerialStruct, BaseRow, SerialInputImpl, SerialOutputImpl
forax at univ-mlv.fr
Thu Jan 26 14:21:23 PST 2012
On 01/26/2012 10:46 PM, Lance Andersen - Oracle wrote:
> Looking for a reviewer for http://cr.openjdk.java.net/~lancea/7133815/webrev.00/
> this is a small change to address 2 findbug errors. The findbug issues being addressed:
> May expose internal representation by returning reference to mutable object
> Load of known null value
> For CachedRowSetImpl, SerialStruct, BaseRow, SerialInputImpl, SerialOutputImpl
I think it's better to use array.clone() or
Arrays.copyOf(array, array.length) which is a little faster.
so the code of CachedRowSetImpl should be:
intkeyCols = this.keyCols;
return (keyCols == null)? null: Arrays.copyOf(keyCols, keyCols.length);
otherwise the code of SQLOutputImpl is ok for me.
More information about the core-libs-dev