Github user DaanHoogland commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1530#discussion_r64402502
  
    --- Diff: 
vmware-base/src/com/cloud/hypervisor/vmware/mo/VmdkFileDescriptor.java ---
    @@ -27,55 +27,53 @@
     
     import org.apache.log4j.Logger;
     
    +import com.cloud.utils.StringUtils;
    +import com.google.common.base.Preconditions;
    +
     public class VmdkFileDescriptor {
         private static final Logger s_logger = 
Logger.getLogger(VmdkFileDescriptor.class);
         private static final String VMDK_PROPERTY_CREATE_TYPE = "createType";
         private static final String VMDK_CREATE_TYPE_VMFSSPARSE = "vmfsSparse";
         private static final String VMDK_PROPERTY_ADAPTER_TYPE = 
"ddb.adapterType";
     
    -    private Properties _properties = new Properties();
    +    private final Properties _properties = new Properties();
         private String _baseFileName;
     
         public VmdkFileDescriptor() {
         }
     
         public void parse(byte[] vmdkFileContent) throws IOException {
    -        BufferedReader in = null;
    -        try {
    -            in = new BufferedReader(new InputStreamReader(new 
ByteArrayInputStream(vmdkFileContent),"UTF-8"));
    +        try (BufferedReader in = new BufferedReader(new 
InputStreamReader(new ByteArrayInputStream(vmdkFileContent),"UTF-8"));) {
                 String line;
                 while ((line = in.readLine()) != null) {
                     // ignore empty and comment lines
                     line = line.trim();
    -                if (line.isEmpty())
    -                    continue;
    -                if (line.charAt(0) == '#')
    +                if (line.isEmpty() | line.charAt(0) == '#') {
    --- End diff --
    
    sure, i don't think it matters for a boolean but I'll change it


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to