I guess the other way to handle this would be to iterate over pathSplitter's return value and call buildPath appropriately, but that'd produce the same amount of GC garbage. I can try and fix buildPath() in a future pull request.