MCPcopy Create free account
hub / github.com/LFYSec/MScan / nullComparison

Method nullComparison

src/test/resources/bugfinder/NullDeref.java:60–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58 }
59
60 void nullComparison() {
61 Object a = null;
62 Object[] array = null;
63 if (a == null) { // report warning
64 nullArray();
65 }
66 if (array != null) {// report warning
67 nullArray();
68 }
69 if (null != a) {// report warning
70 nullArray();
71 }
72 Object b = new Object();
73 if (a != b) {// report warning
74 throwNull();
75 }
76 if (a instanceof NullDeref) {
77 throwNull();
78 }
79 }
80}

Callers

nothing calls this directly

Calls 2

nullArrayMethod · 0.95
throwNullMethod · 0.95

Tested by

no test coverage detected