Alona Kaplan has posted comments on this change.
Change subject: findbugs: String comparison is not using equals method
......................................................................
Patch Set 12: (3 inline comments)
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddClusterRM.java
Line 72: VDSGroup candidate = configureModel.getCandidateCluster();
Line 73: ClusterModel clusterModel = configureModel.getCluster();
Line 74: String clusterName = (String)
clusterModel.getName().getEntity();
Line 75:
Line 76: if (candidate == null || (candidate.getname() != null &&
!candidate.getname().equals(clusterName))) {
You are missing a case here -if candidate.getname() is null and clusterName is
not you will skip the if although you have to enter.
Please use StringHelper.stringsEqual() instead of the second part of the if.
Line 77:
Line 78: // Try to find existing cluster with the specified name.
Line 79: VDSGroup cluster = context.clusterFoundByName;
Line 80:
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddDataCenterRM.java
Line 78: StoragePool candidate =
configureModel.getCandidateDataCenter();
Line 79: DataCenterModel dataCenterModel =
configureModel.getDataCenter();
Line 80: String dataCenterName = (String)
dataCenterModel.getName().getEntity();
Line 81:
Line 82: if (candidate == null || (candidate.getname() != null &&
!candidate.getname().equals(dataCenterName))) {
Same comment as in AddClusterRM.java
Line 83:
Line 84: // Try to find existing data center with the specified
name.
Line 85: StoragePool dataCenter = context.dataCenterFoundByName;
Line 86:
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java
Line 2166: return prestartedVmsHint;
Line 2167: }
Line 2168:
Line 2169: public void setPrestartedVmsHint(String value) {
Line 2170: if (prestartedVmsHint != null &&
!prestartedVmsHint.equals(value)) {
Same comment as in AddClusterRM.java
Line 2171: prestartedVmsHint = value;
Line 2172: onPropertyChanged(new
PropertyChangedEventArgs("PrestartedVmsHint")); //$NON-NLS-1$
Line 2173: }
Line 2174: }
--
To view, visit http://gerrit.ovirt.org/14199
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I740261ed3383e147928505ea53edc19e2996ce69
Gerrit-PatchSet: 12
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Asaf Shakarchi <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches