Gilad Chaplik has posted comments on this change.
Change subject: findbugs: String comparison is not using equals method
......................................................................
Patch Set 8: (5 inline comments)
....................................................
File
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/template/TemplateGeneralModelForm.java
Line 95:
Line 96: @Override
Line 97: public boolean isTrue() {
Line 98: String quotaName = getModel().getQuotaName();
Line 99: return quotaName != null &&
!quotaName.equals("");
it is nicer to check "".equals(var)
but it's not that important here.
if you have the time please change.
Line 100: }
Line 101: }) {
Line 102: @Override
Line 103: public boolean isVisible() {
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/disks/DiskGeneralModel.java
Line 68: }
Line 69:
Line 70: public void setDiskId(String value)
Line 71: {
Line 72: if (!diskId.equals(value))
what about nullity here?
Line 73: {
Line 74: diskId = value;
Line 75: onPropertyChanged(new PropertyChangedEventArgs("ID"));
//$NON-NLS-1$
Line 76: }
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddClusterRM.java
Line 73: ClusterModel clusterModel = configureModel.getCluster();
Line 74: String clusterName = (String)
clusterModel.getName().getEntity();
Line 75:
Line 76: if (candidate == null ||
!candidate.getname().equals(clusterName)) {
Line 77:
check nullity also here (for name)
Line 78: // Try to find existing cluster with the specified name.
Line 79: VDSGroup cluster = context.clusterFoundByName;
Line 80:
Line 81: if (cluster != null) {
....................................................
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().equals(dataCenterName)) {
same
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.equals(value)) {
same.
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: 8
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