Use precompiled patterns

This commit is contained in:
Greg Wilkins 2015-06-19 15:36:57 +10:00
parent 13b63c194b
commit 8e635001de
1 changed files with 1 additions and 2 deletions

View File

@ -44,7 +44,6 @@ public final class Props implements Iterable<Prop>
{
private static final Pattern __propertyPattern = Pattern.compile("(?<=[^$]|^)\\$\\{([^:}]*)(:=([^}]*))?\\}");
public static class Prop
{
public String key;
@ -324,7 +323,7 @@ public final class Props implements Iterable<Prop>
public static boolean hasPropertyKey(String name)
{
return Pattern.compile("(?<=[^$]|^)(\\$\\{[^}]*\\})").matcher(name).find();
return __propertyPattern.matcher(name).find();
}
@Override