Remove keyValues map per sebb's suggestion
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1590059 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d9bd12dc92
commit
d13a40266f
|
@ -595,7 +595,6 @@ public class FastDateParser implements DateParser, Serializable {
|
||||||
private static class CaseInsensitiveTextStrategy extends Strategy {
|
private static class CaseInsensitiveTextStrategy extends Strategy {
|
||||||
private final int field;
|
private final int field;
|
||||||
private final Locale locale;
|
private final Locale locale;
|
||||||
private final Map<String, Integer> keyValues;
|
|
||||||
private final Map<String, Integer> lKeyValues;
|
private final Map<String, Integer> lKeyValues;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -607,7 +606,7 @@ public class FastDateParser implements DateParser, Serializable {
|
||||||
CaseInsensitiveTextStrategy(final int field, final Calendar definingCalendar, final Locale locale) {
|
CaseInsensitiveTextStrategy(final int field, final Calendar definingCalendar, final Locale locale) {
|
||||||
this.field= field;
|
this.field= field;
|
||||||
this.locale= locale;
|
this.locale= locale;
|
||||||
this.keyValues= getDisplayNames(field, definingCalendar, locale);
|
Map<String, Integer> keyValues = getDisplayNames(field, definingCalendar, locale);
|
||||||
this.lKeyValues= new HashMap<String,Integer>();
|
this.lKeyValues= new HashMap<String,Integer>();
|
||||||
|
|
||||||
for(Map.Entry<String, Integer> entry : keyValues.entrySet()) {
|
for(Map.Entry<String, Integer> entry : keyValues.entrySet()) {
|
||||||
|
@ -621,7 +620,7 @@ public class FastDateParser implements DateParser, Serializable {
|
||||||
@Override
|
@Override
|
||||||
boolean addRegex(final FastDateParser parser, final StringBuilder regex) {
|
boolean addRegex(final FastDateParser parser, final StringBuilder regex) {
|
||||||
regex.append("((?iu)");
|
regex.append("((?iu)");
|
||||||
for(final String textKeyValue : keyValues.keySet()) {
|
for(final String textKeyValue : lKeyValues.keySet()) {
|
||||||
escapeRegex(regex, textKeyValue, false).append('|');
|
escapeRegex(regex, textKeyValue, false).append('|');
|
||||||
}
|
}
|
||||||
regex.setCharAt(regex.length()-1, ')');
|
regex.setCharAt(regex.length()-1, ')');
|
||||||
|
@ -637,7 +636,7 @@ public class FastDateParser implements DateParser, Serializable {
|
||||||
if(iVal == null) {
|
if(iVal == null) {
|
||||||
final StringBuilder sb= new StringBuilder(value);
|
final StringBuilder sb= new StringBuilder(value);
|
||||||
sb.append(" not in (");
|
sb.append(" not in (");
|
||||||
for(final String textKeyValue : keyValues.keySet()) {
|
for(final String textKeyValue : lKeyValues.keySet()) {
|
||||||
sb.append(textKeyValue).append(' ');
|
sb.append(textKeyValue).append(' ');
|
||||||
}
|
}
|
||||||
sb.setCharAt(sb.length()-1, ')');
|
sb.setCharAt(sb.length()-1, ')');
|
||||||
|
|
Loading…
Reference in New Issue