File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/main/java/org/elasticsearch/common/joda Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -200,15 +200,15 @@ public DateTimeField getField(Chronology chronology) {
200200
201201 public static class EpochTimeParser implements DateTimeParser {
202202
203- private static final Pattern milliSecondPrecisionPattern = Pattern .compile ("^\\ d{1,13}$" );
204- private static final Pattern secondPrecisionPattern = Pattern .compile ("^\\ d{1,10}$" );
203+ private static final Pattern MILLI_SECOND_PRECISION_PATTERN = Pattern .compile ("^\\ d{1,13}$" );
204+ private static final Pattern SECOND_PRECISION_PATTERN = Pattern .compile ("^\\ d{1,10}$" );
205205
206206 private final boolean hasMilliSecondPrecision ;
207207 private final Pattern pattern ;
208208
209209 public EpochTimeParser (boolean hasMilliSecondPrecision ) {
210210 this .hasMilliSecondPrecision = hasMilliSecondPrecision ;
211- this .pattern = hasMilliSecondPrecision ? milliSecondPrecisionPattern : secondPrecisionPattern ;
211+ this .pattern = hasMilliSecondPrecision ? MILLI_SECOND_PRECISION_PATTERN : SECOND_PRECISION_PATTERN ;
212212 }
213213
214214 @ Override
@@ -218,7 +218,7 @@ public int estimateParsedLength() {
218218
219219 @ Override
220220 public int parseInto (DateTimeParserBucket bucket , String text , int position ) {
221- if (text .length () > estimateParsedLength () || ! pattern .matcher (text ).matches ()) {
221+ if (text .length () > estimateParsedLength () || pattern .matcher (text ).matches () == false ) {
222222 return 0 ;
223223 }
224224
You can’t perform that action at this time.
0 commit comments