jheaps
jheaps copied to clipboard
Static analysis showing null pointers being dereferenced
Sonarqube 7.8 community shows some issues, in particular possible null pointers being dereferenced. Example in src/main/java/org/jheaps/tree/BinaryTreeSoftAddressableHeap.java.
Line 810 implies that 'cur1' can be null. In Line 772 'cur1' is dereferenced. Same happens with 'cur2'. Also in src/main/java/org/jheaps/tree/BinaryTreeSoftHeap.java.
Is this expected or false positive?
Hi,
this is indeed a false positive. Anyway, thanks for your comment. I took the opportunity to clean up the code based on SonarCube's findings.