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.
Also updateCounts should be declared 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();
      }


Have a great weekend!

Regards,
lance

regards,
Rémi

Reply via email to