Author: luc
Date: Sat Jan 12 14:09:36 2008
New Revision: 611498
URL: http://svn.apache.org/viewvc?rev=611498&view=rev
Log:
replaced array sharing by array copying to remove a findbugs warning
(this is used only for exception, so there should be no performance problems
here)
Modified:
commons/proper/math/trunk/src/java/org/apache/commons/math/MathException.java
Modified:
commons/proper/math/trunk/src/java/org/apache/commons/math/MathException.java
URL:
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/MathException.java?rev=611498&r1=611497&r2=611498&view=diff
==============================================================================
---
commons/proper/math/trunk/src/java/org/apache/commons/math/MathException.java
(original)
+++
commons/proper/math/trunk/src/java/org/apache/commons/math/MathException.java
Sat Jan 12 14:09:36 2008
@@ -150,7 +150,7 @@
public MathException(String pattern, Object[] arguments) {
super(buildMessage(pattern, arguments, Locale.US));
this.pattern = pattern;
- this.arguments = arguments;
+ this.arguments = (Object[]) arguments.clone();
this.rootCause = null;
}
@@ -196,7 +196,7 @@
public MathException(String pattern, Object[] arguments, Throwable
rootCause) {
super(buildMessage(pattern, arguments, Locale.US));
this.pattern = pattern;
- this.arguments = arguments;
+ this.arguments = (Object[]) arguments.clone();
this.rootCause = rootCause;
}
@@ -213,7 +213,7 @@
* @return the arguments used to build the message of this throwable
*/
public Object[] getArguments() {
- return arguments;
+ return (Object[]) arguments.clone();
}
/** Gets the message in a specified locale.