Update of /var/cvs/src/org/mmbase/util/functions
In directory james.mmbase.org:/tmp/cvs-serv7589

Modified Files:
        Parameters.java 
Log Message:
fixed to String for when PatternParameter were used


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/util/functions


Index: Parameters.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/util/functions/Parameters.java,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- Parameters.java     20 Aug 2008 12:46:41 -0000      1.41
+++ Parameters.java     20 Aug 2008 21:11:30 -0000      1.42
@@ -24,7 +24,7 @@
  *
  * @author Michiel Meeuwissen
  * @since  MMBase-1.7
- * @version $Id: Parameters.java,v 1.41 2008/08/20 12:46:41 michiel Exp $
+ * @version $Id: Parameters.java,v 1.42 2008/08/20 21:11:30 michiel Exp $
  * @see Parameter
  * @see #Parameters(Parameter[])
  */
@@ -46,6 +46,8 @@
     protected final Map<String, Object> backing;
 
     protected final List<Map.Entry<String, Object>> patternBacking;
+
+    // Index of the first PatternParameter
     protected int patternLimit = -1;
 
     /**
@@ -211,10 +213,17 @@
     public String toString() {
         StringBuilder buf = new StringBuilder("[");
         checkDef();
-        for (int i = fromIndex; i < toIndex; i++) {
-            if (i > fromIndex) buf.append(", ");
+        int i = fromIndex;
+        for (i = fromIndex; i < toIndex && i < patternLimit; i++) {
+            if (buf.length() > 1) buf.append(", ");
             buf.append(definition[i]).append('=').append(get(i));
         }
+        if (patternBacking != null) {
+            for (Map.Entry<String, Object> entry : patternBacking) {
+                if (buf.length() > 1) buf.append(", ");
+                
buf.append(entry.getKey()).append('=').append(entry.getValue());
+            }
+        }
         buf.append("]");
         return buf.toString();
     }
_______________________________________________
Cvs mailing list
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to