I think this is probably intended behaviour. In Java switch is a
computed goto, whereas in Groovy switch is a cascading if -- i.e. in
Java there is a single value computation and then goto, whereas in
Groovy the case labels are computed one after the other until a true
occurs. This means default has to be the last case label in Groovy.
Ruby has the same sort of switch/case behavior, but in Ruby 1.9 it's
optimized to turn switches with all literal case values into a simple
goto. Perhaps the same optimization would work for Groovy?