Date: 2004-11-07T02:37:18
   Editor: ShinobuKawai <[EMAIL PROTECTED]>
   Wiki: Jakarta-Velocity Wiki
   Page: ArrayTool
   URL: http://wiki.apache.org/jakarta-velocity/ArrayTool

   Remove List support.  I don't feel it right to be here.

Change Log:

------------------------------------------------------------------------------
@@ -63,9 +63,6 @@
      * Converts an array object into a java.util.List.
      * <ul>
      *   <li>
-     *     If the object is a java.util.List, it will return the object itself.
-     *   </li>
-     *   <li>
      *     If the object is an array of an Object,
      *     it will return a java.util.List of the elements.
      *   </li>
@@ -86,10 +83,6 @@
         {
             return null;
         }
-        if (array instanceof List)
-        {
-            return (List) array;
-        }
         if (!array.getClass().isArray())
         {
             return null;
@@ -115,7 +108,7 @@
      * It will return null under the following conditions:
      * <ul>
      *   <li><code>array</code> is null.</li>
-     *   <li><code>array</code> is neither an array nor a java.util.List.</li>
+     *   <li><code>array</code> is not an array.</li>
      *   <li><code>array</code> doesn't have an <code>index</code>th 
value.</li>
      * </ul>
      * @param array the array object.
@@ -130,10 +123,6 @@
         }
         try
         {
-            if (array instanceof List)
-            {
-                return ((List) array).get(index);
-            }
             if (array.getClass().isArray())
             {
                 return Array.get(array, index);
@@ -151,7 +140,7 @@
      * It will return null under the following conditions:
      * <ul>
      *   <li><code>array</code> is null.</li>
-     *   <li><code>array</code> is neither an array nor a java.util.List.</li>
+     *   <li><code>array</code> is not an array.</li>
      * </ul>
      * @param array the array object.
      * @return the length of an array.
@@ -161,10 +150,6 @@
         if (array == null)
         {
             return null;
-        }
-        if (array instanceof List)
-        {
-            return new Integer(((List) array).size());
         }
         if (!array.getClass().isArray())
         {

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to