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: r981238 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math: analysis/interpolation/ optimization/general/ optimization/univariate/ util/
Date Sun, 01 Aug 2010 17:06:26 GMT
>      /** {@inheritDoc} */
> -    public void setConvergenceChecker(RealConvergenceChecker checker) {
> -        this.checker = checker;
> +    public void setConvergenceChecker(RealConvergenceChecker convergenceChecker) {
> +        this.checker = convergenceChecker;
>      }

Why does "checkstyle" complain about the name "checker" for the parameter?

> Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
> URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java?rev=981238&r1=981237&r2=981238&view=diff
> ==============================================================================
> --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
(original)
> +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
Sun Aug  1 15:01:30 2010
> @@ -1868,10 +1868,18 @@ public final class MathUtils {
>      }
>  
>      public static class Order {
> +
> +        /** Enumerate type for increasing/decreasing directions. */
>          public static enum Direction {
> -                INCREASING,
> -                DECREASING
> +
> +            /** Constant for increasing direction. */
> +            INCREASING,
> +
> +            /** Constant for decreasing direction. */
> +            DECREASING

Indeed, I don't know why I had created a two-level enum...
Although, maybe it was because I was thinking that we could put other
"characteristics" there, such as "strictness" (which now is specified
through a boolean).

> -     * @throws {@link NotStrictlyPositiveException} if one of the sizes is
> +     * @throws NotStrictlyPositiveException if one of the sizes is

Does Javadoc automatically create an HTML link for the argument of the
"@throws" tag?

> -    public int getCount(int ... c) {
> +    public int getCount(int ... c) throws OutOfRangeException {

Does "checkstyle" complain about unchecked exceptions not appearing in the
throws clause?
On the one hand I would agree to put unchecked exceptions if it prevents
tools from complaining about unused "import". On the other hand, it is
considered to be bad programming style since it cannot mean that only the
unchecked exceptions referred to there can actually be thrown.


Gilles

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


Mime
View raw message