On 16 February 2012 16:17,  <l...@apache.org> wrote:
> Author: luc
> Date: Thu Feb 16 16:17:14 2012
> New Revision: 1245061
>
> URL: http://svn.apache.org/viewvc?rev=1245061&view=rev
> Log:
> Removed unneeded clone.
>
> The clone did not protect the array used, only the reference ones.
> JIRA: MATH-650

-1

That was the whole point of the clone - to protect the original external data.

> Modified:
>    
> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/FastMathLiteralArrays.java
>
> Modified: 
> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/FastMathLiteralArrays.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/FastMathLiteralArrays.java?rev=1245061&r1=1245060&r2=1245061&view=diff
> ==============================================================================
> --- 
> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/FastMathLiteralArrays.java
>  (original)
> +++ 
> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/FastMathLiteralArrays.java
>  Thu Feb 16 16:17:14 2012
> @@ -6139,7 +6139,7 @@ class FastMathLiteralArrays {
>      * @return a clone of the data array.
>      */
>     static double[] loadExpIntA() {
> -        return EXP_INT_A.clone();
> +        return EXP_INT_A;
>     }
>     /**
>      * Load "EXP_INT_B".
> @@ -6147,7 +6147,7 @@ class FastMathLiteralArrays {
>      * @return a clone of the data array.
>      */
>     static double[] loadExpIntB() {
> -        return EXP_INT_B.clone();
> +        return EXP_INT_B;
>     }
>     /**
>      * Load "EXP_FRAC_A".
> @@ -6155,7 +6155,7 @@ class FastMathLiteralArrays {
>      * @return a clone of the data array.
>      */
>     static double[] loadExpFracA() {
> -        return EXP_FRAC_A.clone();
> +        return EXP_FRAC_A;
>     }
>     /**
>      * Load "EXP_FRAC_B".
> @@ -6163,7 +6163,7 @@ class FastMathLiteralArrays {
>      * @return a clone of the data array.
>      */
>     static double[] loadExpFracB() {
> -        return EXP_FRAC_B.clone();
> +        return EXP_FRAC_B;
>     }
>     /**
>      * Load "LN_MANT".
> @@ -6171,6 +6171,6 @@ class FastMathLiteralArrays {
>      * @return a clone of the data array.
>      */
>     static double[][] loadLnMant() {
> -        return LN_MANT.clone();
> +        return LN_MANT;
>     }
>  }
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to