false positive: @NotNull (or @Nonnull) not initialized in ctor

85 views
Skip to first unread message

psi...@gmail.com

unread,
May 31, 2017, 6:33:24 PM5/31/17
to SonarLint
Hi,

If a field is annotated with either:  javax.annotation.Nonnull or javax.validation.constraints.NotNull, SonarLint will raise an issue when it is not initialized in every constructor (even when a constructor always delegates to another constructor where the value is initialized). Screenshot attached.


Michael Gumowski

unread,
Jun 1, 2017, 2:52:00 AM6/1/17
to psi...@gmail.com, SonarLint
Hello,

Thanks for your feedback, it's a known issue which have been already reported multiple times. Here is the ticket to handle it: SONARJAVA-2227

Cheers,
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/5712f3df-ed22-4391-aa46-2afc9a72e53b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Michael Gumowski | SonarSource
Software Developer, Language Team
http://sonarsource.com
Reply all
Reply to author
Forward
0 new messages