Package has following package-info.java:
@ParametersAreNonnullByDefault
package foo;
import javax.annotation.ParametersAreNonnullByDefault;Class has the following method:
private static String toIsoString(@Nullable Instant dateTime) {
return dateTime == null ? null : dateTime.toString();
}On which SonarQube (Version 6.2, SonarJava 4.14.0.11784) gives the following warning (squid:S2583):
How can I convince SonarQube that the code is actually correct?
Interestingly, SonarLint plugin (3.0.0.2041) in Idea and FindBugs doesn't generate the same warning
(but do correctly generate warning in case of omitted @Nullable annotation on argument).
--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/e9f1651b-552f-4aac-a551-1814f2f92001%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Senior Developer
Hi,This is quite suprising that you have a discrepancy between what you see on SonarQube and in SonarLint : are you using the connected mode ?If yes, how do you analyse the project on the server and how is configured sonar.java.libraries ?Cheers,
Le ven. 20 oct. 2017 à 15:36, Dmitri Maximovich <ma...@maximdim.com> a écrit :
This is continuation of discussion started at StackOverflow:I would copy the original message here for convenience:============================================================================Package has following package-info.java:
@ParametersAreNonnullByDefault package foo; import javax.annotation.ParametersAreNonnullByDefault;Class has the following method:
private static String toIsoString(@Nullable Instant dateTime) { return dateTime == null ? null : dateTime.toString(); }
On which SonarQube (Version 6.2, SonarJava 4.14.0.11784) gives the following warning (squid:S2583):
How can I convince SonarQube that the code is actually correct?
Interestingly, SonarLint plugin (3.0.0.2041) in Idea and FindBugs doesn't generate the same warning
(but do correctly generate warning in case of omitted @Nullable annotation on argument).
--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/e9f1651b-552f-4aac-a551-1814f2f92001%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Nicolas Peru | SonarSourceSenior Developer
https://sonarsource.com
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/e9f1651b-552f-4aac-a551-1814f2f92001%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Nicolas Peru | SonarSourceSenior Developer
https://sonarsource.com
--Sincerely,
Dmitri Maximovich
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/e9f1651b-552f-4aac-a551-1814f2f92001%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Nicolas Peru | SonarSourceSenior Developer
https://sonarsource.com
--Sincerely,
Dmitri Maximovich
--Nicolas Peru | SonarSourceSenior Developer
https://sonarsource.com
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/e9f1651b-552f-4aac-a551-1814f2f92001%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Nicolas Peru | SonarSourceSenior Developer
https://sonarsource.com
--Sincerely,
Dmitri Maximovich
--Nicolas Peru | SonarSourceSenior Developer
https://sonarsource.com
--Sincerely,
Dmitri Maximovich