commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r905684 - in /commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang: text/StrBuilder.java time/DurationFormatUtils.java time/FastDateFormat.java
Date Tue, 02 Feb 2010 16:03:15 GMT
Author: niallp
Date: Tue Feb  2 16:03:07 2010
New Revision: 905684

URL: http://svn.apache.org/viewvc?rev=905684&view=rev
Log:
Comments

Modified:
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/text/StrBuilder.java
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/DurationFormatUtils.java
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/FastDateFormat.java

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/text/StrBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/text/StrBuilder.java?rev=905684&r1=905683&r2=905684&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/text/StrBuilder.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/text/StrBuilder.java
Tue Feb  2 16:03:07 2010
@@ -86,9 +86,9 @@
     private static final long serialVersionUID = 7628716375283629643L;
 
     /** Internal data storage. */
-    protected char[] buffer;
+    protected char[] buffer; // TODO make private?
     /** Current size of the buffer. */
-    protected int size;
+    protected int size; // TODO make private?
     /** The new line. */
     private String newLine;
     /** The null text. */
@@ -1355,7 +1355,7 @@
             ensureCapacity(newSize);
             System.arraycopy(buffer, index, buffer, index + strLen, size - index);
             size = newSize;
-            str.getChars(0, strLen, buffer, index);
+            str.getChars(0, strLen, buffer, index); // str cannot be null here
         }
         return this;
     }

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/DurationFormatUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/DurationFormatUtils.java?rev=905684&r1=905683&r2=905684&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/DurationFormatUtils.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/DurationFormatUtils.java
Tue Feb  2 16:03:07 2010
@@ -498,7 +498,7 @@
         for(int i=0; i<sz; i++) {
             char ch = array[i];
             if(inLiteral && ch != '\'') {
-                buffer.append(ch);
+                buffer.append(ch); // buffer can't be null if inLiteral is true
                 continue;
             }
             Object value = null;

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/FastDateFormat.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/FastDateFormat.java?rev=905684&r1=905683&r2=905684&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/FastDateFormat.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/FastDateFormat.java
Tue Feb  2 16:03:07 2010
@@ -105,7 +105,7 @@
      */
     public static final int SHORT = DateFormat.SHORT;
     
-    private static String cDefaultPattern;
+    private static String cDefaultPattern; // lazily initialised by getInstance()
 
     private static final Map cInstanceCache = new HashMap(7);
     private static final Map cDateInstanceCache = new HashMap(7);



Mime
View raw message