Shahar Havivi has uploaded a new change for review.

Change subject: findbugs: possible null pointer dereference
......................................................................

findbugs: possible null pointer dereference

Change-Id: I47f76604af97462f60b7de8a52eec75f34f6560e
Signed-off-by: Shahar Havivi <[email protected]>
---
M 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/job/ExecutionMessageDirectorTest.java
M 
backend/manager/tools/src/test/java/org/ovirt/engine/core/tools/common/db/StandaloneDataSourceTest.java
2 files changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/35/14235/1

diff --git 
a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/job/ExecutionMessageDirectorTest.java
 
b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/job/ExecutionMessageDirectorTest.java
index 1ae4a84..9c87dc3 100644
--- 
a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/job/ExecutionMessageDirectorTest.java
+++ 
b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/job/ExecutionMessageDirectorTest.java
@@ -47,7 +47,8 @@
                 }
             }
         } catch (RuntimeException e) {
-            fail("Missing entry in enum " + testEnum.getSimpleName() + " for 
key " + testKey);
+            String test = (testEnum != null) ? testEnum.getSimpleName() : 
"[null]";
+            fail("Missing entry in enum " + test + " for key " + testKey);
         }
     }
 
diff --git 
a/backend/manager/tools/src/test/java/org/ovirt/engine/core/tools/common/db/StandaloneDataSourceTest.java
 
b/backend/manager/tools/src/test/java/org/ovirt/engine/core/tools/common/db/StandaloneDataSourceTest.java
index 8ad3100..c1188b4 100644
--- 
a/backend/manager/tools/src/test/java/org/ovirt/engine/core/tools/common/db/StandaloneDataSourceTest.java
+++ 
b/backend/manager/tools/src/test/java/org/ovirt/engine/core/tools/common/db/StandaloneDataSourceTest.java
@@ -19,7 +19,9 @@
             Assert.assertNotNull(connection);
         }
         finally {
-            connection.close();
+            if (connection != null) {
+                connection.close();
+            }
         }
     }
 


--
To view, visit http://gerrit.ovirt.org/14235
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47f76604af97462f60b7de8a52eec75f34f6560e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to