> + switch (type) {
> + case NOVNC:
> + case XVPVNC:
> + action = "os-getVNCConsole";
> + break;
> + case SPICE_HTML5:
> + action = "os-getSPICEConsole";
> + break;
> + case RDP_HTML5:
> + action = "os-getRDPConsole";
> + break;
> + default:
> + throw new IllegalArgumentException("Invalid type: " + type);
> + }
> +
> + return bindToRequest(request, (Object) ImmutableMap.of(action,
> ImmutableSortedMap.copyOf(postParams)));
What is the cast required for? To ensure the correct overloaded method is
called? In that case, assign as a variable?
```
Object paramsObject ImmutableMap.of(action,
ImmutableSortedMap.copyOf(postParams));
return bindToRequest(request, paramsObject);
```
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/339/files#r13035006