You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2011/04/22 15:51:54 UTC

svn commit: r1095935 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/util/FormattableUtils.java

Author: ggregory
Date: Fri Apr 22 13:51:53 2011
New Revision: 1095935

URL: http://svn.apache.org/viewvc?rev=1095935&view=rev
Log:
Eat own dog food: Replace "" with StringUtils.EMPTY.

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/util/FormattableUtils.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/util/FormattableUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/util/FormattableUtils.java?rev=1095935&r1=1095934&r2=1095935&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/util/FormattableUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/util/FormattableUtils.java Fri Apr 22 13:51:53 2011
@@ -22,6 +22,7 @@ import java.util.Formattable;
 import java.util.Formatter;
 
 import org.apache.commons.lang3.ObjectUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.Validate;
 
 /**
@@ -128,7 +129,7 @@ public class FormattableUtils {
                 "Specified ellipsis '%1$s' exceeds precision of %2$s", ellipsis, precision);
         StringBuilder buf = new StringBuilder(seq);
         if (precision >= 0 && precision < seq.length()) {
-            CharSequence _ellipsis = ObjectUtils.defaultIfNull(ellipsis, "");
+            CharSequence _ellipsis = ObjectUtils.defaultIfNull(ellipsis, StringUtils.EMPTY);
             buf.replace(precision - _ellipsis.length(), seq.length(), _ellipsis.toString());
         }
         boolean leftJustify = (flags & LEFT_JUSTIFY) == LEFT_JUSTIFY;