You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Andrew Gaul <no...@github.com> on 2013/06/01 05:40:04 UTC
Re: [jclouds] Remove strings2 replaceall (#21)
> - input = CHAR_TO_PATTERN.get(match).matcher(input).replaceAll(replacement);
> - } catch (ExecutionException e) {
> - throw new IllegalStateException("error creating pattern: " + match, e);
> - }
> - }
> - return input;
> - }
> -
> - private static final LoadingCache<Character, Pattern> CHAR_TO_PATTERN = CacheBuilder.newBuilder()
> - .<Character, Pattern> build(new CacheLoader<Character, Pattern>() {
> - @Override
> - public Pattern load(Character plain) {
> - return Pattern.compile(plain + "");
> - }
> - });
> -
Caching is now the caller's responsibility. In most cases they should allocate a static Pattern.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/21/files#r4488279