Review needed for 7132879 to address the findbug errors in CachedRowSetImpl, SerialStruct, BaseRow, SerialInputImpl, SerialOutputImpl (original) (raw)

Rémi Forax forax at univ-mlv.fr
Thu Jan 26 22:21:23 UTC 2012


On 01/26/2012 10:46 PM, Lance Andersen - Oracle wrote:

Hi,

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 and Load of known null value

For CachedRowSetImpl, SerialStruct, BaseRow, SerialInputImpl, SerialOutputImpl

Hi Lance, 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:

int[]keyCols = this.keyCols; return (keyCols == null)? null: Arrays.copyOf(keyCols, keyCols.length);

otherwise the code of SQLOutputImpl is ok for me.

cheers, Rémi



More information about the core-libs-dev mailing list