spray/spray — pull request #860 by lihaoyi (2014-05-07 06:54:26+00:00)
Title: = util: remove unnecessary reflection in regex

Rather than reflecting on the pattern to get at the `capturingGroupCount` field (which does not exist on android and makes the routes blow up) we take the pattern and do a dummy match against an empty string, getting the `groupCount` from the result.

All the spray-routing tests passed, and trying it out in the console, the new snippet seems to do what I want. It also made my spray-on-android attempt get further in the boot process before blowing up on something else, so it solved my initial problem.