Allon Mureinik has posted comments on this change.

Change subject: findbugs: fixing boxing-unboxing issues
......................................................................


Patch Set 1: (6 inline comments)

....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageDomain.java
Line 200:         return totalDiskSize;
Line 201:     }
Line 202: 
Line 203:     public void setTotalDiskSize(Integer value) {
Line 204:         value = (value == null) ? new Integer(0) : value;
This will produce a Number Constructor FindBugs warning.
Please use Integer.valueOf(0)
Line 205:         if (!totalDiskSize.equals(value)) {
Line 206:             totalDiskSize = value;
Line 207:         }
Line 208:     }


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/gluster/GlusterBrickDaoDbFacadeImpl.java
Line 93:         return getCustomMapSqlParameterSource().addValue("id", 
brick.getId())
Line 94:                 .addValue("volume_id", brick.getVolumeId())
Line 95:                 .addValue("server_id", brick.getServerId())
Line 96:                 .addValue("brick_dir", brick.getBrickDirectory())
Line 97:                 .addValue("brick_order", (brick.getBrickOrder() == 
null) ? new Integer(0) : brick.getBrickOrder())
Here too - use Integer.valueOf(0)
Line 98:                 .addValue("status", 
EnumUtils.nameOrNull(brick.getStatus()));
Line 99:     }
Line 100: 
Line 101:     /**


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/rsdl/RsdlBuilder.java
Line 440:                 Object value = 
action.getRequest().getHeaders().get(key);
Line 441:                 if (value != null) {
Line 442:                     ParamData paramData = (ParamData) value;
Line 443:                     header.setValue(paramData.getValue());
Line 444:                     header.setRequired(paramData.getRequired() == 
null ? new Boolean(false) : paramData.getRequired());
Use Boolean.FALSE
Line 445:                 }
Line 446: 
Line 447:                 
link.getRequest().getHeaders().getHeaders().add(header);
Line 448:             }


Line 461:                     ParamData urlParamData = (ParamData)value;
Line 462:                     param.setType(urlParamData.getType());
Line 463:                     param.setContext(urlParamData.getContext());
Line 464:                     param.setValue(urlParamData.getValue());
Line 465:                     
param.setRequired(urlParamData.getRequired()==null ? new Boolean(false) : 
urlParamData.getRequired());
use Boolean.FALSE
Line 466:                 }
Line 467:                 ps.getParameters().add(param);
Line 468:             }
Line 469:             link.getRequest().getUrl().getParametersSets().add(ps);


....................................................
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java
Line 681:      * @return - the double value.
Line 682:      */
Line 683:     private static Double 
assignDoubleValueWithNullProtection(XmlRpcStruct input, String name) {
Line 684:         Double doubleValue = AssignDoubleValue(input, name);
Line 685:         return (doubleValue == null ? new Double(0.0) : doubleValue);
Here too - use Double.valueOf(0.0)
Line 686:     }
Line 687: 
Line 688:     private static Integer AssignIntValue(XmlRpcStruct input, String 
name) {
Line 689:         if (input.containsKey(name)) {


....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/EditNetworkModel.java
Line 27:         }
Line 28:         getDescription().setEntity(getNetwork().getDescription());
Line 29:         getIsStpEnabled().setEntity(getNetwork().getStp());
Line 30:         getHasVLanTag().setEntity(getNetwork().getVlanId() != null);
Line 31:         getVLanTag().setEntity((getNetwork().getVlanId() == null ? new 
Integer(0) : getNetwork().getVlanId()));
Here too - use Integer.valueOf(0)
Line 32:         initMtu();
Line 33:         initIsVm();
Line 34:     }
Line 35: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibcec12523c2d09b15c2322e3b82ee47e27d03836
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Shahar Havivi <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to