On 04/22/2011 06:51 PM, Lance Andersen - Oracle wrote:
Hi Remi,
Thank you for the feedback.
[...]
You should use clone() instead of Arrays.copyOf.
Can you explain why you have a preference for clone() in this case?
It does the job :)
Arrays.copyOf() allows to resize the array.
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
regards,
rémi