Liron Ar has uploaded a new change for review.

Change subject: core: removal of unneeded member/method
......................................................................

core: removal of unneeded member/method

StorageDomainCommandBase has a private member called _storagePool and a method
called getStoragePool() which overrides the getStoragePool() method
defined at AuditLogableBase. The setter method isn't being overriden,
which means that calling getStoragePool() on StorageDomainCommandBase
and lower classes in it's hierarchy will return the value of the
_storagePool member defined in StorageDomainCommandBase, while using the
setter will set the value of the storage_pool member defined in
AuditLogableBase, thus it won't affect the value of the recieved storage
pool.

In this patch I just removed the storage_pool member defined within
StorageDomainCommandBase as it's unneeded (we already have that higher
in the hierarchy) and it's getter as they are unneeded.

Change-Id: Ie4746c35e2f5c37e672e47e56314d115c6b25025
Signed-off-by: Liron Aravot <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageDomainCommandBase.java
1 file changed, 0 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/61/14161/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageDomainCommandBase.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageDomainCommandBase.java
index 36972e2..5ccd52e 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageDomainCommandBase.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageDomainCommandBase.java
@@ -20,7 +20,6 @@
 import org.ovirt.engine.core.common.businessentities.StorageServerConnections;
 import org.ovirt.engine.core.common.businessentities.StorageType;
 import org.ovirt.engine.core.common.businessentities.StorageDomain;
-import org.ovirt.engine.core.common.businessentities.storage_pool;
 import org.ovirt.engine.core.common.config.Config;
 import org.ovirt.engine.core.common.config.ConfigValues;
 import org.ovirt.engine.core.compat.Guid;
@@ -45,8 +44,6 @@
 @SuppressWarnings("serial")
 public abstract class StorageDomainCommandBase<T extends 
StorageDomainParametersBase> extends
         StorageHandlingCommandBase<T> {
-
-    private storage_pool _storagePool;
 
     public StorageDomainCommandBase(T parameters) {
         super(parameters);
@@ -135,16 +132,6 @@
 
     private boolean isMaster() {
         return getStorageDomain().getStorageDomainType() == 
StorageDomainType.Master;
-    }
-
-    @Override
-    public storage_pool getStoragePool() {
-        if (_storagePool == null) {
-            if (getStoragePoolId() != null && 
!getStoragePoolId().equals(Guid.Empty)) {
-                _storagePool = 
getStoragePoolDAO().get(getStoragePoolId().getValue());
-            }
-        }
-        return _storagePool;
     }
 
     @Override


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

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

Reply via email to