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

    https://github.com/apache/cloudstack/pull/669#discussion_r104768693
  
    --- Diff: 
plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java
 ---
    @@ -595,6 +602,25 @@ private PlugNicAnswer execute(final PlugNicCommand 
cmd) {
             }
         }
     
    +    private CopyFileInVmAnswer execute(CopyFileInVmCommand cmd) {
    +        File keyFile = getSystemVMKeyFile();
    +        try {
    +            File file = new File(cmd.getSrc());
    +            if(file.exists()) {
    --- End diff --
    
    What about instantiating the response right away `CopyFileInVmAnswer 
copyFileInVmAnswer = new CopyFileInVmAnswer(cmd)` in the first lines? Then, you 
could reduce this cyclomatic complexity here (if/if/for). You could negate the 
Ifs, if the negation is true, you then return `copyFileInVmAnswer `.
    
    what do you think of that?


---
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