rubieHess commented on a change in pull request #4800: URL: https://github.com/apache/cloudstack/pull/4800#discussion_r598318705
########## File path: plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java ########## @@ -4266,7 +4266,11 @@ public void setBackingFileFormat(String volPath) { Map<String, String> info = qemu.info(file); String backingFilePath = info.get(new String("backing_file")); Review comment: I detect that this code is problematic. According to the [Performance (PERFORMANCE)](https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#performance-performance), [Dm: Method invokes inefficient new String(String) constructor (DM_STRING_CTOR)](https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#dm-method-invokes-inefficient-new-string-string-constructor-dm-string-ctor). Using the java.lang.String(String) constructor wastes memory because the object so constructed will be functionally indistinguishable from the String passed as a parameter. Just use the argument String directly. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org