Print

Print


The parameters are sorted - but only after being copied into the array  
that they're printed from.

Here's a fix (does away with the array copy entirely):

Index: ParameterDatabase.java
===================================================================
RCS file: /cvs/ecj/ecj/ec/util/ParameterDatabase.java,v
retrieving revision 1.5
diff -c -r1.5 ParameterDatabase.java
*** ParameterDatabase.java	4 Feb 2008 19:07:34 -0000	1.5
--- ParameterDatabase.java	11 Feb 2008 00:57:27 -0000
***************
*** 2289,2303 ****
                   vec.addElement(e.nextElement());

               // sort the keys
-             Object[] array = new Object[vec.size()];
-             vec.copyInto(array);
-
               java.util.Collections.sort(vec);

               // Uncheck and print each item
!             for (int x = 0; x < array.length; x++)
                   {
!                 String s = (String) (array[x]);
                   String v = null;
                   if (s != null)
                       v = (String) gather.get(s);
--- 2289,2300 ----
                   vec.addElement(e.nextElement());

               // sort the keys
               java.util.Collections.sort(vec);

               // Uncheck and print each item
!             for (int x = 0; x < vec.size(); x++)
                   {
!                 String s = (String) vec.get(x);
                   String v = null;
                   if (s != null)
                       v = (String) gather.get(s);