commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <gil...@harfang.homelinux.org>
Subject Re: svn commit: r1078445 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/CMAESOptimizer.java
Date Sun, 06 Mar 2011 13:07:07 GMT
Hi.
 
> URL: http://svn.apache.org/viewvc?rev=1078445&view=rev
> Log:
> Rename private variables to avoid name shadowing
> 
> Modified:
>     commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/CMAESOptimizer.java
> 
> Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/CMAESOptimizer.java
> URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/CMAESOptimizer.java?rev=1078445&r1=1078444&r2=1078445&view=diff
> ==============================================================================
> --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/CMAESOptimizer.java
(original)
> +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/CMAESOptimizer.java
Sun Mar  6 10:58:23 2011
> @@ -827,7 +827,7 @@ public class CMAESOptimizer extends
>      private class FitnessFunction {
>  
>          /** Optional bounds for the objective variables */
> -        private final double[][] boundaries;
> +        private final double[][] _boundaries;

I thought that the "_" prefix was forbidden in the coding guidelines.
[Not that I don't like it but if it cannot be used everywhere, neither
should it be here.]

A cleaner solution would be to remove the shadowing fields. From a quick
look they seem to be a copy of those of the enclosing class.


Gilles

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


Mime
View raw message