Review request for 7038565, for a findbugs warning for BatchUpdateException

Rémi Forax forax at
Fri Apr 22 16:29:09 UTC 2011

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

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


More information about the core-libs-dev mailing list