DaanHoogland commented on code in PR #12135:
URL: https://github.com/apache/cloudstack/pull/12135#discussion_r2568530121


##########
services/console-proxy/rdpconsole/src/main/java/common/Client.java:
##########
@@ -299,16 +299,16 @@ private Element 
setMainElementAndAddressBasedOnProtocol(Protocol protocol, SSLSt
 
     private Protocol parseOptions(String[] args) {
         String protocolName = (args.length > 0) ? args[0] : "";
-        Protocol protocol = Protocol.NONE;
+        Protocol protocol;

Review Comment:
   ```suggestion
           Protocol protocol;
           try {
               protocol = Protocol.valueOf(protocolName);
           } catch (IllegalArgumentException e) {
               protocol = Protocol.NONE;
           }
   ```



##########
services/console-proxy/rdpconsole/src/main/java/common/Client.java:
##########


Review Comment:
   ```suggestion
           switch (protocol) {
               case VNC:
                   options = join(commonOptions, vncOptions);
                   break;
               case RDP:
                   options = join(commonOptions, rdpOptions);
                   break;case HYPERV:
                   options = join(commonOptions, hyperVOptions);
                   break;
               case NONE:
                   help();
                   return Protocol.NONE;
           }
   ```



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to