Alissa Bonas has uploaded a new change for review. Change subject: webadmin: remove redundant variable ......................................................................
webadmin: remove redundant variable Remove isNew variable because it's not needed. The evaluated statement storage==null is always false, because couple of rows before that storage name and descriptions are evaluated, and if storage was null, then NPE would be thrown there. Thus, storage is not null and the expression is always false, and isNew variable is not needed. Change-Id: Ib755a8fb39bae04349ee2617d556a589ab7cfd5c Signed-off-by: Alissa Bonas <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageListModel.java 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/63/12063/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageListModel.java index d90a34c..660c7b1 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageListModel.java @@ -357,9 +357,8 @@ model.getFormat().setIsChangable(false); boolean isStorageActive = model.isStorageActive(); - boolean isNew = storage == null; - model.getHost().setIsChangable(isNew); + model.getHost().setIsChangable(false); model.getName().setIsChangable(isStorageActive); model.getAvailableStorageItems().setIsChangable(isStorageActive); model.setIsChangable(isStorageActive); -- To view, visit http://gerrit.ovirt.org/12063 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib755a8fb39bae04349ee2617d556a589ab7cfd5c 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
