mirror of https://github.com/apache/lucene.git
Reverting changes for SOLR-913 -- Expensive Pattern object made static in SnapPuller per discussion on solr-dev
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@726505 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
44758ae090
commit
b2f340e60f
|
@ -947,11 +947,12 @@ public class SnapPuller {
|
||||||
}
|
}
|
||||||
|
|
||||||
static Integer readInterval(String interval) {
|
static Integer readInterval(String interval) {
|
||||||
|
Pattern pattern = Pattern.compile(INTERVAL_PATTERN);
|
||||||
if (interval == null)
|
if (interval == null)
|
||||||
return null;
|
return null;
|
||||||
int result = 0;
|
int result = 0;
|
||||||
if (interval != null) {
|
if (interval != null) {
|
||||||
Matcher m = INTERVAL_PATTERN.matcher(interval.trim());
|
Matcher m = pattern.matcher(interval.trim());
|
||||||
if (m.find()) {
|
if (m.find()) {
|
||||||
String hr = m.group(1);
|
String hr = m.group(1);
|
||||||
String min = m.group(2);
|
String min = m.group(2);
|
||||||
|
@ -1003,5 +1004,5 @@ public class SnapPuller {
|
||||||
|
|
||||||
public static final String INTERVAL_ERR_MSG = "The " + POLL_INTERVAL + " must be in this format 'HH:mm:ss'";
|
public static final String INTERVAL_ERR_MSG = "The " + POLL_INTERVAL + " must be in this format 'HH:mm:ss'";
|
||||||
|
|
||||||
private static final Pattern INTERVAL_PATTERN = Pattern.compile("(\\d*?):(\\d*?):(\\d*)");
|
private static final String INTERVAL_PATTERN = "(\\d*?):(\\d*?):(\\d*)";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue