Depends. But good catch anyway.

Offending line:

        && file.equals( violation.file )

The only field without null check in the constructor or using
Objects.equals.

Can there be a violation without a file though? Ie outside a file?
If not, let's "fix" it in the next release.

On Sun, 24 Jan 2021, 15:43 Elliotte Rusty Harold, <elh...@ibiblio.org>
wrote:

> There's at least one NullPointerException in the new Violation class's
> equals method, possibly others. I'm -1.
>
>
> package org.apache.maven.plugins.checkstyle;
>
> import org.junit.Assert;
> import org.junit.Test;
>
> public class ViolationTest
> {
>
>     @Test
>     public void testEquals() {
>         Violation v1 = new Violation("", null, "", "", "", "", "");
>         Violation v2 = new Violation("", null, "", "", "", "", "");
>         Assert.assertEquals( v1, v2 );
>     }
>
>
> }
>
> On Sun, Jan 24, 2021 at 12:33 PM Benjamin Marwell <bmarw...@apache.org>
> wrote:
> >
> > [X] +1 (non binding)
> >
> > sha512 is correct for me
> > Works in a sample project.
> >
> > Am So., 24. Jan. 2021 um 00:02 Uhr schrieb Sylwester Lachiewicz
> > <slachiew...@apache.org>:
> > >
> > > Hi,
> > >
> > > We solved 5 issues:
> > >
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12317223&version=12347024&styleName=Text
> > >
> > > There are still a couple of issues left in JIRA:
> > >
> https://issues.apache.org/jira/issues/?jql=project%20%3D%20MCHECKSTYLE%20AND%20resolution%20%3D%20Unresolved%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC
> > >
> > > Staging repo:
> > > https://repository.apache.org/content/repositories/maven-1624/
> > >
> https://repository.apache.org/content/repositories/maven-1624/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.2/maven-checkstyle-plugin-3.1.2-source-release.zip
> > >
> > > Source release checksum(s):
> > > maven-checkstyle-plugin-3.1.2-source-release.zip sha512:
> > >
> 4d90277a306390ec5a6434e01631295654fc4c45c1a4a0b5fae6c7c000a40e8357667fa943d05ddb55d1d742eae7628f371e4aba637941c538791bdd9ef39d08
> > >
> > > Staging site:
> > >
> https://maven.apache.org/plugins-archives/maven-checkstyle-plugin-LATEST/
> > >
> > > Guide to testing staged releases:
> > >
> https://maven.apache.org/guides/development/guide-testing-releases.html
> > >
> > > Vote open for at least 72 hours.
> > >
> > > [ ] +1
> > > [ ] +0
> > > [ ] -1
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> > > For additional commands, e-mail: dev-h...@maven.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> > For additional commands, e-mail: dev-h...@maven.apache.org
> >
>
>
> --
> Elliotte Rusty Harold
> elh...@ibiblio.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>

Reply via email to