Change in ovirt-engine[master]: core: Use "Integer.toString" in "HSMGetStorageDomainsListVDS...

juan.hernandez at redhat.com juan.hernandez at redhat.com
Fri Sep 25 08:36:48 UTC 2015


Juan Hernandez has submitted this change and it was merged.

Change subject: core: Use "Integer.toString" in "HSMGetStorageDomainsListVDSCommand"
......................................................................


core: Use "Integer.toString" in "HSMGetStorageDomainsListVDSCommand"

This is needed in order to avoid the following findbugs error:

  Method allocates a boxed primitive just to call toString

  A boxed primitive is allocated just to call toString(). It is more
  effective to just use the static form of toString which takes the
  primitive value. So,

  Replace...                   With this...
  new Integer(1).toString()    Integer.toString(1)
  new Long(1).toString()       Long.toString(1)
  new Float(1.0).toString()    Float.toString(1.0)
  new Double(1.0).toString()   Double.toString(1.0)
  new Byte(1).toString()       Byte.toString(1)
  new Short(1).toString()      Short.toString(1)
  new Boolean(true).toString() Boolean.toString(true)

  Bug kind and pattern: Bx - DM_BOXED_PRIMITIVE_TOSTRING

Change-Id: I2612b3ed9f06f4a54e738e70ab133ce1bdda916c
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/HSMGetStorageDomainsListVDSCommand.java
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Juan Hernandez: Verified; Looks good to me, approved; Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/46605
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2612b3ed9f06f4a54e738e70ab133ce1bdda916c
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: automation at ovirt.org



More information about the Engine-commits mailing list