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:
Shalin Shekhar Mangar 2008-12-14 17:56:56 +00:00
parent 44758ae090
commit b2f340e60f
1 changed files with 3 additions and 2 deletions

View File

@ -947,11 +947,12 @@ public class SnapPuller {
}
static Integer readInterval(String interval) {
Pattern pattern = Pattern.compile(INTERVAL_PATTERN);
if (interval == null)
return null;
int result = 0;
if (interval != null) {
Matcher m = INTERVAL_PATTERN.matcher(interval.trim());
Matcher m = pattern.matcher(interval.trim());
if (m.find()) {
String hr = m.group(1);
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'";
private static final Pattern INTERVAL_PATTERN = Pattern.compile("(\\d*?):(\\d*?):(\\d*)");
private static final String INTERVAL_PATTERN = "(\\d*?):(\\d*?):(\\d*)";
}