diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-15 14:33:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-15 16:34:59 +0100 |
commit | f40120dc6fca7170a416be2c75ff47b5946efc87 (patch) | |
tree | 49519da534a66bc7c668261a40827f2b6e23b62c /qadevOOo/tests/java/ifc/beans | |
parent | 293dd731e9815c06ba8eca1fb83d86276103c820 (diff) |
coverity#1326293 Dereference after null check
Change-Id: I6ce295873eb2ed1231ad1d95babfcc2c8ff265e8
Diffstat (limited to 'qadevOOo/tests/java/ifc/beans')
-rw-r--r-- | qadevOOo/tests/java/ifc/beans/_XExactName.java | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/qadevOOo/tests/java/ifc/beans/_XExactName.java b/qadevOOo/tests/java/ifc/beans/_XExactName.java index ab8f6f96572d..033426e22f17 100644 --- a/qadevOOo/tests/java/ifc/beans/_XExactName.java +++ b/qadevOOo/tests/java/ifc/beans/_XExactName.java @@ -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 +} |