mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-06 01:58:24 +00:00
Format.
This commit is contained in:
parent
5e5ba1b812
commit
bcc7c0c858
@ -200,17 +200,17 @@ private class StrategyParser {
|
||||
private int currentIdx;
|
||||
|
||||
StrategyParser(String pattern, Calendar definingCalendar) {
|
||||
this.pattern = pattern;
|
||||
this.definingCalendar = definingCalendar;
|
||||
this.pattern = pattern;
|
||||
this.definingCalendar = definingCalendar;
|
||||
}
|
||||
|
||||
StrategyAndWidth getNextStrategy() {
|
||||
if(currentIdx >= pattern.length()) {
|
||||
if (currentIdx >= pattern.length()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
char c = pattern.charAt(currentIdx);
|
||||
if( isFormatLetter(c)) {
|
||||
if (isFormatLetter(c)) {
|
||||
return letterPattern(c);
|
||||
}
|
||||
return literal();
|
||||
@ -218,8 +218,8 @@ StrategyAndWidth getNextStrategy() {
|
||||
|
||||
private StrategyAndWidth letterPattern(char c) {
|
||||
int begin = currentIdx;
|
||||
while( ++currentIdx<pattern.length() ) {
|
||||
if(pattern.charAt(currentIdx) != c) {
|
||||
while (++currentIdx < pattern.length()) {
|
||||
if (pattern.charAt(currentIdx) != c) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user