On 4/23/19 1:05 PM, Claes Redestad wrote: > Bug: https://bugs.openjdk.java.net/browse/JDK-8222852 > Webrev: http://cr.openjdk.java.net/~redestad/8222852/open.00/
Cool. Do we see the real-world examples where this helps? E.g. larger applications that have lots of concats? Asking because most apps do not have lots of concat shapes to begin with. I'd keep the switch in the second loop, like this: for (RecipeElement el : recipe.getElements()) { switch (el.getTag()) { case TAG_ARG: ... break; case TAG_CONST: // Constants are already handled in the code above. break; default: throw new StringConcatException("Unhandled tag: " + el.getTag()); } } -Aleksey