Use precompiled patterns
This commit is contained in:
parent
13b63c194b
commit
8e635001de
|
@ -44,7 +44,6 @@ public final class Props implements Iterable<Prop>
|
||||||
{
|
{
|
||||||
private static final Pattern __propertyPattern = Pattern.compile("(?<=[^$]|^)\\$\\{([^:}]*)(:=([^}]*))?\\}");
|
private static final Pattern __propertyPattern = Pattern.compile("(?<=[^$]|^)\\$\\{([^:}]*)(:=([^}]*))?\\}");
|
||||||
|
|
||||||
|
|
||||||
public static class Prop
|
public static class Prop
|
||||||
{
|
{
|
||||||
public String key;
|
public String key;
|
||||||
|
@ -324,7 +323,7 @@ public final class Props implements Iterable<Prop>
|
||||||
|
|
||||||
public static boolean hasPropertyKey(String name)
|
public static boolean hasPropertyKey(String name)
|
||||||
{
|
{
|
||||||
return Pattern.compile("(?<=[^$]|^)(\\$\\{[^}]*\\})").matcher(name).find();
|
return __propertyPattern.matcher(name).find();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue