> @@ -323,6 +326,43 @@ private void addNetworkSecurityGroup() {
>  
>     }
>  
> +   // Helper function for simplifying an array of ports to a list of ranges 
> FirewallOptions expects.
> +   public static List<String> simplifyPorts(int[] ports){
> +      if ((ports == null) || (ports.length == 0)) {
> +         return null;

This should never happen at this point, as it is already validated before. 
Consider it a precondition of this method and better throw an 
`IllegalArgumentException`. Otherwise you must add a check in the caller to 
verify that the returned value is not null, to avoid NPEs.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/300/files/bbfa9982d1d1f2674fa45fd24ba89db1f39f0831#r70711130

Reply via email to