Kaydet (Commit) f40120dc authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1326293 Dereference after null check

Change-Id: I6ce295873eb2ed1231ad1d95babfcc2c8ff265e8
üst 293dd731
......@@ -41,13 +41,12 @@ public class _XExactName extends MultiMethodTest {
if (getting == null) {
res = false;
} else {
res = getting.equals(expectedName);
}
if (!res) {
log.println("didn't get the expected Name:");
log.println("getting: " + getting);
log.println("Expected: " + expectedName);
if (!getting.equals(expectedName)) {
log.println("didn't get the expected Name:");
log.println("getting: " + getting);
log.println("Expected: " + expectedName);
res = false;
}
}
nameFor = expectedName.toUpperCase();
......@@ -58,13 +57,12 @@ public class _XExactName extends MultiMethodTest {
if (getting == null) {
res = false;
} else {
res &= getting.equals(expectedName);
}
if (!getting.equals(expectedName)) {
log.println("didn't get the expected Name:");
log.println("getting: " + getting);
log.println("Expected: " + expectedName);
if (!getting.equals(expectedName)) {
log.println("didn't get the expected Name:");
log.println("getting: " + getting);
log.println("Expected: " + expectedName);
res = false;
}
}
tRes.tested("getExactName()", res);
......@@ -83,4 +81,4 @@ public class _XExactName extends MultiMethodTest {
"Object relation expectedName is missing"));
}
}
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment