cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anshul1886 <...@git.apache.org>
Subject [GitHub] cloudstack pull request: CLOUDSTACK-9025: Fixed can't create usabl...
Date Sun, 06 Dec 2015 06:50:08 GMT
Github user anshul1886 commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1176#discussion_r46767279
  
    --- Diff: plugins/hypervisors/xenserver/src/com/cloud/hypervisor/XenServerGuru.java ---
    @@ -185,7 +185,8 @@ public boolean trackVmHostChange() {
                 DataTO srcData = cpyCommand.getSrcTO();
                 DataTO destData = cpyCommand.getDestTO();
     
    -            if (srcData.getObjectType() == DataObjectType.SNAPSHOT && destData.getObjectType()
== DataObjectType.TEMPLATE) {
    +            if (srcData.getHypervisorType() == HypervisorType.XenServer && srcData.getObjectType()
== DataObjectType.SNAPSHOT &&
    --- End diff --
    
    @ustcweizhou @bhaisaab I prefer == to equals() method here for two reasons
    1) Enum equals() method has same code internally http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/Enum.java#Enum.equals%28java.lang.Object%29
    
    2) This will not result in NullPointerExceptions


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message