I know the new String[0] does not look particularly nice but using [] would produce an instance of List which does not match the required argument type of String[] for . 
In this case I think using "new String[]" is still better than "[].toArray(new String[0])" to make the compiler happy.

Changing the method allocatePorts to accept a Collection instead of an array make the DSL use less nice:

```groovy
allocatePorts '8080', 'HTTP'    //using Array arg

allocatePorts ['8080', 'HTTP']  // using collection arg
allocatePorts ['8080']          // using collection arg
```

The best solution IMO would be a vararg, but there it clashes with the requirement that both closure and vararg have to be the last parameter of a method.

It's one of the cases where Java rears it's ugly head and it's a choice between fire and frying pan.

So I opt for leaving this one in as it is.