Allon Mureinik has posted comments on this change.
Change subject: findbugs: String comparison is not using equals method
......................................................................
Patch Set 4: (4 inline comments)
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/disks/DiskGeneralModel.java
Line 100: }
Line 101:
Line 102: public void setQuotaName(String value)
Line 103: {
Line 104: if (!privateQuotaName.equals(value))
Can't quota name be null?
Line 105: {
Line 106: privateQuotaName = value;
Line 107: onPropertyChanged(new PropertyChangedEventArgs("Quota
Name")); //$NON-NLS-1$
Line 108: }
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java
Line 1262: && getIsPowerManagementTabValid() &&
getConsoleAddress().getIsValid();
Line 1263: }
Line 1264:
Line 1265: private boolean isEntityModelEmpty(EntityModel model) {
Line 1266: return !(model.getEntity() != null &&
!model.getEntity().equals(""));
Save the null check:
!"".equals(model.getEntity())
Line 1267: }
....................................................
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)) {
can this be null?
Line 2171: prestartedVmsHint = value;
Line 2172: onPropertyChanged(new
PropertyChangedEventArgs("PrestartedVmsHint")); //$NON-NLS-1$
Line 2173: }
Line 2174: }
....................................................
File
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/quota/SubTabQuotaClusterView.java
Line 35: private void initTable(final ApplicationConstants constants, final
ApplicationMessages messages) {
Line 36: getTable().addColumn(new
TextColumnWithTooltip<QuotaVdsGroup>() {
Line 37: @Override
Line 38: public String getValue(QuotaVdsGroup object) {
Line 39: return object.getVdsGroupName() == null ||
object.getVdsGroupName().equals("") ?
constants.ultQuotaForAllClustersQuotaPopup()
save the null check - use "".equals...
Line 40: : object.getVdsGroupName();
Line 41: }
Line 42: },
Line 43: constants.nameCluster());
--
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: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Asaf Shakarchi <[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