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);
|
||||
if (!activeQuote && isFormatLetter(c)) {
|
||||
break;
|
||||
} else if (c == '\'') {
|
||||
if (++currentIdx == pattern.length() || pattern.charAt(currentIdx) != '\'') {
|
||||
activeQuote = !activeQuote;
|
||||
continue;
|
||||
}
|
||||
} else if (c == '\'' && (++currentIdx == pattern.length() || pattern.charAt(currentIdx) != '\'')) {
|
||||
activeQuote = !activeQuote;
|
||||
continue;
|
||||
}
|
||||
++currentIdx;
|
||||
sb.append(c);
|
||||
|
|
Loading…
Reference in New Issue