You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Alex Herbert <al...@gmail.com> on 2021/06/02 23:17:21 UTC

Re: [commons-numbers] branch master updated: NUMBERS-161: Class "Angle" (holding the user-supplied value without round-off).

On Wed, 2 Jun 2021 at 23:48, <er...@apache.org> wrote:

-- SNIP --

     <module name="EmptyStatement" />

> -    <module name="EqualsHashCode" />
> +    <!-- <module name="EqualsHashCode" /> -->
>      <!-- Method parameters and local variables should not hide fields,
> except in constructors and setters -->
>      <module name="HiddenField">
>          <property name="ignoreConstructorParameter" value="true" />
>

Disabling the checkstyle rule applies to all code. Some of the code in
numbers should conform to this rule (Complex, Fraction, etc). This case
should use the checkstyle exclusions file instead.

You can mark the exclusions with a note to state that the hash code method
is in the super class (Angle) for the Angle implementations, none of which
have additional fields to include in the hash.

Alex

Re: [commons-numbers] branch master updated: NUMBERS-161: Class "Angle" (holding the user-supplied value without round-off).

Posted by Gilles Sadowski <gi...@gmail.com>.
Le jeu. 3 juin 2021 à 01:17, Alex Herbert <al...@gmail.com> a écrit :
>
> On Wed, 2 Jun 2021 at 23:48, <er...@apache.org> wrote:
>
> -- SNIP --
>
>      <module name="EmptyStatement" />
>
> > -    <module name="EqualsHashCode" />
> > +    <!-- <module name="EqualsHashCode" /> -->
> >      <!-- Method parameters and local variables should not hide fields,
> > except in constructors and setters -->
> >      <module name="HiddenField">
> >          <property name="ignoreConstructorParameter" value="true" />
> >
>
> Disabling the checkstyle rule applies to all code. Some of the code in
> numbers should conform to this rule (Complex, Fraction, etc). This case
> should use the checkstyle exclusions file instead.
>
> You can mark the exclusions with a note to state that the hash code method
> is in the super class (Angle) for the Angle implementations, none of which
> have additional fields to include in the hash.

Done.

Thanks,
Gilles

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