Moti Asayag has uploaded a new change for review.

Change subject: restapi: findbugs error
......................................................................

restapi: findbugs error

Fixing a findbug error although the warned NPE by findbugs
shouldn't occur (there is no code path which will end in NPE),
it is easier to pass its warning by using the 'else' statement.

Change-Id: I8b6749df88b78c3cdb6ef187bebc86de912856b7
Signed-off-by: Moti Asayag <[email protected]>
---
M 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendClusterNetworksResource.java
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/91/14691/1

diff --git 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendClusterNetworksResource.java
 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendClusterNetworksResource.java
index 04446a9..99c4411 100644
--- 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendClusterNetworksResource.java
+++ 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendClusterNetworksResource.java
@@ -42,8 +42,9 @@
             org.ovirt.engine.core.common.businessentities.network.Network net 
= lookupNetwork(asGuid(network.getId()));
             if (net == null) {
                 notFound(Network.class);
+            } else {
+                networkName = net.getName();
             }
-            networkName = net.getName();
         }
 
         String networkId = null;


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

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

Reply via email to