42 lines
1.5 KiB
Plaintext
42 lines
1.5 KiB
Plaintext
![]() |
=== On 2015-03-23T13:15:46Z Freddy Mallet Wrote:
|
||
|
@Ann, could you review this sub-task ? Thanks
|
||
|
|
||
|
=== On 2015-03-24T12:47:38Z Samuel Mercier Wrote:
|
||
|
first example is wrong, since ``++instanceof++`` would return ``++false++`` if ``++obj++`` is ``++null++``.
|
||
|
|
||
|
Interestingly, from null/notnull point of view, ``++a instanceof b++`` is equivalent to ``++a != null++``
|
||
|
|
||
|
=== On 2015-03-24T13:45:55Z Samuel Mercier Wrote:
|
||
|
\[~ann.campbell.2] I updated the first non compliant code snippet.
|
||
|
|
||
|
=== On 2015-03-24T15:02:13Z Samuel Mercier Wrote:
|
||
|
Removed message * NullPointerException will be thrown as 'XXXX' is for sure null here, since we are currently unable to make distinction between @Nullable and if (... == null)
|
||
|
|
||
|
=== On 2019-09-19T05:14:31Z QXO Wrote:
|
||
|
This code shouldnot should not be a issue ( in `url.substring(0,start)` url never not null)
|
||
|
|
||
|
It's sonarqube(7.9.1) check implements issue, please fix the issue:)
|
||
|
|
||
|
----
|
||
|
public String testSonarNullCheckIssue(final String url,final boolean isUrl) {
|
||
|
int start = url != null && isUrl ? url.indexOf('?') : -1;
|
||
|
if(start != -1 ){
|
||
|
return url.substring(0,start);
|
||
|
}
|
||
|
return url;
|
||
|
} {code}
|
||
|
|
||
|
ref: https://drive.google.com/open?id=1MuZMBm8bkwz_Q5mZIwEaDsJoh-qaopW_
|
||
|
----
|
||
|
|
||
|
=== On 2019-09-19T07:24:31Z Alexandre Gigleux Wrote:
|
||
|
Thanks for the feedback [~qxo]!
|
||
|
|
||
|
Can you report the FP in the community forum \https://community.sonarsource.com/tags/c/bug/fp/java so it gets more visibility and be addressed?
|
||
|
|
||
|
JIRA comments are not convenient to manage FPs.
|
||
|
|
||
|
Thanks
|
||
|
|
||
|
include::../comments-and-links.adoc[]
|