On 15/04/2015 10:36, Paul Sandoz wrote:
:
Yes, one could use a Pattern.splitAsStream, sorry could not resist :-) assuming
this area is not sensitive to bootstrap issues e.g.
hander =
p.splitAsStream().map(String::trim).flatMap(this::getHandler).findFirst().orElse(null);
This is a fallback for custom protocol handlers so there shouldn't be
any bootstrapping or performance issues here. If this were for the core
protocol handlers loaded early in startup then it might need a closer
look (and performance/startup measurements).
-Alan