> -            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

Reply via email to