commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [lang] Format.
Date Thu, 25 Feb 2016 06:12:03 GMT
Repository: commons-lang
Updated Branches:
  refs/heads/master bcc7c0c85 -> f3a7cf629


Format.

Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/f3a7cf62
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/f3a7cf62
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/f3a7cf62

Branch: refs/heads/master
Commit: f3a7cf629c19dc80734b5b6c3933fcc76c8a50a0
Parents: bcc7c0c
Author: ggregory <ggregory@apache.org>
Authored: Wed Feb 24 22:11:59 2016 -0800
Committer: ggregory <ggregory@apache.org>
Committed: Wed Feb 24 22:11:59 2016 -0800

----------------------------------------------------------------------
 .../org/apache/commons/lang3/time/FastDateParser.java  | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/f3a7cf62/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
index 0c7685d..de940c3 100644
--- a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
+++ b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
@@ -232,13 +232,12 @@ public class FastDateParser implements DateParser, Serializable {
             boolean activeQuote = false;
 
             StringBuilder sb = new StringBuilder();
-            while( currentIdx<pattern.length() ) {
-                char c= pattern.charAt(currentIdx);
-                if( !activeQuote && isFormatLetter( c ) ) {
+            while (currentIdx < pattern.length()) {
+                char c = pattern.charAt(currentIdx);
+                if (!activeQuote && isFormatLetter(c)) {
                     break;
-                }
-                else if( c=='\'' ) {
-                    if(++currentIdx==pattern.length() || pattern.charAt(currentIdx)!='\'')
{
+                } else if (c == '\'') {
+                    if (++currentIdx == pattern.length() || pattern.charAt(currentIdx) !=
'\'') {
                         activeQuote = !activeQuote;
                         continue;
                     }
@@ -247,7 +246,7 @@ public class FastDateParser implements DateParser, Serializable {
                 sb.append(c);
             }
 
-            if(activeQuote) {
+            if (activeQuote) {
                 throw new IllegalArgumentException("Unterminated quote");
             }
 


Mime
View raw message