Review request for 7038565, for a findbugs warning for BatchUpdateException
Lance Andersen - Oracle
Lance.Andersen at oracle.com
Fri Apr 22 16:51:02 UTC 2011
Hi Remi,
Thank you for the feedback.
On Apr 22, 2011, at 12:29 PM, Rémi Forax wrote:
> On 04/22/2011 06:22 PM, Lance Andersen - Oracle wrote:
>> Hi Folks,
>
> Hi Lance,
>
>> I am looking for a reviewer for this update to BatchUpdateException to address a findbugs issue for exposing a mutable object.
>>
>> The webrev is at http://cr.openjdk.java.net/~lancea/7038565/
>
> You should use clone() instead of Arrays.copyOf.
Can you explain why you have a preference for clone() in this case?
> Also updateCounts should be declared final
I will make updateCounts final.
> and initialized like this:
>
> public BatchUpdateException(String reason, String SQLState, int vendorCode,
> int []updateCounts,Throwable cause) {
> super(reason, SQLState, vendorCode, cause);
> this.updateCounts = (updateCounts == null)? null:updateCounts.clone();
> }
>
Regards,
lance
>
>> Have a great weekend!
>>
>> Regards,
>> lance
>
> regards,
> Rémi
>
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
More information about the core-libs-dev
mailing list