Confusion over @NonNullByDefault

30 views
Skip to first unread message

Jeslie Chermak

unread,
May 22, 2018, 4:24:09 PM5/22/18
to SonarLint

CODE FRAGMENT:

import org.eclipse.jdt.annotation.Nullable;

...

    @Nullable

    Point extendPath(final Point point, final int time) {

        ...
        return null;

    }

PRODUCES:

"@NonNull" values should not be set to null(squid:S2637)


@NonNullByDefault was specified for the containing package.

Michael Gumowski

unread,
May 23, 2018, 3:29:51 AM5/23/18
to Jeslie Chermak, SonarLint
Hello,

Thank you for your feedback. In order to efficiently work on this, we will need a bit more information
  • What's your version of SonarLint ?
  • Are you using connected mode ?
    • If yes, what's the version of SonarJava plugin on your SonarQube instance
  • What's the fully qualified names of the annotations you are using (including the one from the package)
  • Could you provide a self-contained reproducer which would reproduce the case without having to guess the missing parts?
Regards,
Michael

--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/0084a7bc-9a33-4b79-a76c-5c3deae4bf81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Michael Gumowski | SonarSource
Software Developer, Language Team
https://www.sonarsource.com

Jeslie Chermak

unread,
May 24, 2018, 12:27:04 AM5/24/18
to Michael Gumowski, SonarLint
Michael,

I just downloaded SonarLint into Eclipse last week.  I have no SonarQube.  The annotations come from package org.eclipse.jdt.annotation.  I’m in package ai.rideos.robot.routing.  I’ve created a Java package, sonar.bug, which shows this bug and also another (Confusion over @NonNullByDefault) that  I’d filed yesterday.  Here are the two necessary files:

package-info.java
SquidS2589.java

Jeslie Chermak

unread,
May 24, 2018, 11:47:00 AM5/24/18
to Michael Gumowski, SonarLint
SonarLint for Eclipse: version 3.5.0.201804241315

On May 23, 2018, at 9:26 PM, Jeslie Chermak <jeslie....@gmail.com> wrote:

Michael,

I just downloaded SonarLint into Eclipse last week.  I have no SonarQube.  The annotations come from package org.eclipse.jdt.annotation.  I’m in package ai.rideos.robot.routing.  I’ve created a Java package, sonar.bug, which shows this bug and also another (Confusion over @NonNullByDefault) that  I’d filed yesterday.  Here are the two necessary files:

<package-info.java>
<SquidS2589.java>

THESE ARE SIMPLIFICATIONS of the actual code (extendPath() is normally in another class in the package) which has most of the logic stripped while maintaining the Sonar bug.
Reply all
Reply to author
Forward
0 new messages