Alissa Bonas has uploaded a new change for review.

Change subject: core: remove redundant creation of array
......................................................................

core: remove redundant creation of array

Remove redundant creation of array when creating a List object

Change-Id: I530513734fe6071ff190878ebcfe9dd55a1ecce6
Signed-off-by: Alissa Bonas <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageServerConnectionCommand.java
1 file changed, 5 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/24/11224/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageServerConnectionCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageServerConnectionCommand.java
index ef48778..0826074 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageServerConnectionCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageServerConnectionCommand.java
@@ -5,10 +5,10 @@
 import org.apache.commons.lang.StringUtils;
 import org.ovirt.engine.core.bll.InternalCommandAttribute;
 import 
org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase;
+import org.ovirt.engine.core.common.businessentities.StorageServerConnections;
 import org.ovirt.engine.core.common.businessentities.StorageType;
 import org.ovirt.engine.core.common.businessentities.VDSStatus;
 import org.ovirt.engine.core.common.businessentities.storage_pool;
-import org.ovirt.engine.core.common.businessentities.StorageServerConnections;
 import org.ovirt.engine.core.common.validation.NfsMountPointConstraint;
 import org.ovirt.engine.core.common.validation.group.CreateEntity;
 import org.ovirt.engine.core.compat.Guid;
@@ -35,7 +35,7 @@
             currConnection.setid(Guid.NewGuid().toString());
             getDbFacade().getStorageServerConnectionDao().save(currConnection);
         }
-       getReturnValue().setActionReturnValue(getConnection().getid());
+        getReturnValue().setActionReturnValue(getConnection().getid());
         setSucceeded(true);
     }
 
@@ -82,12 +82,9 @@
             if (returnValue) {
                 IStorageHelper storageHelper = 
StorageHelperDirector.getInstance().getItem(
                         paramConnection.getstorage_type());
-                if (!storageHelper.validateStoragePoolConnectionsInHost(
-                        getVds(),
-                        new 
java.util.ArrayList<StorageServerConnections>(java.util.Arrays
-                                .asList(new StorageServerConnections[] { 
paramConnection })), Guid.Empty))
-
-                {
+                if 
(!storageHelper.validateStoragePoolConnectionsInHost(getVds(),
+                        new 
java.util.ArrayList<StorageServerConnections>(java.util.Arrays.asList(paramConnection)),
+                        Guid.Empty)) {
                     returnValue = false;
                     
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_CONNECTION);
                 }


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

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

Reply via email to