You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following statement causes a false positive UnconditionalJumpStatementInLoop: This loop contains an unconditional jump expression which essentially renders it useless as it will exit the loop during the first iteration.:
Adding braces to the while statement appears to make it disappear. IntelliJ has a suggestion to remove these braces which restores the code above:
As far as I know both variants are semantically equivalent and only differ in syntax.
The code polls the queue until poll returns null which then breaks out of the while loop:
java.util.Queue<E>
E poll()
Retrieves and removes the head of this queue, or returns null if this queue is empty.
Returns:
the head of this queue, or null if this queue is empty
Expected Behavior
I expected it to not report said finding.
Observed Behavior
It reported the code mentioned above as having UnconditionalJumpStatementInLoop
The following statement causes a false positive
UnconditionalJumpStatementInLoop: This loop contains an unconditional jump expression which essentially renders it useless as it will exit the loop during the first iteration.
:Adding braces to the while statement appears to make it disappear. IntelliJ has a suggestion to remove these braces which restores the code above:
As far as I know both variants are semantically equivalent and only differ in syntax.
The code polls the queue until poll returns null which then breaks out of the while loop:
Expected Behavior
I expected it to not report said finding.
Observed Behavior
It reported the code mentioned above as having
UnconditionalJumpStatementInLoop
Steps to Reproduce
Analyze following code:
making sure you have following configuration:
Context
It's a false positive that does not require fixing.
Your Environment
--scan
option when running the gradle task): –The text was updated successfully, but these errors were encountered: