PMD: These nested if statements could be combined
This commit is contained in:
parent
31d02f6806
commit
db6f7c1d74
|
@ -242,11 +242,9 @@ public class FastDateParser implements DateParser, Serializable {
|
||||||
char c = pattern.charAt(currentIdx);
|
char c = pattern.charAt(currentIdx);
|
||||||
if (!activeQuote && isFormatLetter(c)) {
|
if (!activeQuote && isFormatLetter(c)) {
|
||||||
break;
|
break;
|
||||||
} else if (c == '\'') {
|
} else if (c == '\'' && (++currentIdx == pattern.length() || pattern.charAt(currentIdx) != '\'')) {
|
||||||
if (++currentIdx == pattern.length() || pattern.charAt(currentIdx) != '\'') {
|
activeQuote = !activeQuote;
|
||||||
activeQuote = !activeQuote;
|
continue;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
++currentIdx;
|
++currentIdx;
|
||||||
sb.append(c);
|
sb.append(c);
|
||||||
|
|
Loading…
Reference in New Issue