velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbris...@apache.org
Subject svn commit: r594842 - /velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/generic/ValueParser.java
Date Wed, 14 Nov 2007 11:57:38 GMT
Author: cbrisson
Date: Wed Nov 14 03:57:34 2007
New Revision: 594842

URL: http://svn.apache.org/viewvc?rev=594842&view=rev
Log:
conform to the standard Map.toString layout

Modified:
    velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/generic/ValueParser.java

Modified: velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/generic/ValueParser.java
URL: http://svn.apache.org/viewvc/velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/generic/ValueParser.java?rev=594842&r1=594841&r2=594842&view=diff
==============================================================================
--- velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/generic/ValueParser.java
(original)
+++ velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/generic/ValueParser.java
Wed Nov 14 03:57:34 2007
@@ -546,13 +546,18 @@
 
     public String toString() {
         StringBuilder builder = new StringBuilder();
-        builder.append("{ ");
+        builder.append('{');
+        boolean empty = true;
         for(Map.Entry<String,Object> entry:entrySet())
         {
+            if(!empty)
+            {
+                builder.append(", ");
+            }
+            empty = false;
             builder.append(entry.getKey());
             builder.append('=');
             builder.append(String.valueOf(entry.getValue()));
-            builder.append(' ');
         }
         builder.append('}');
         return builder.toString();



Mime
View raw message