[EMAIL PROTECTED] wrote:
> Author: jaz
> Date: Mon Oct 22 07:23:48 2007
> New Revision: 587109
> 
> URL: http://svn.apache.org/viewvc?rev=587109&view=rev
> Log:
> small change to allow ofbiz to compile again
> 
> Modified:
>     ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java
> 
> Modified: 
> ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java
> URL: 
> http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java?rev=587109&r1=587108&r2=587109&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java 
> (original)
> +++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java Mon 
> Oct 22 07:23:48 2007
> @@ -146,20 +146,20 @@
>       * Create a map from passed nameX, valueX parameters
>       * @return The resulting Map
>       */
> -    public static <K, V> Map<K, V> toMap(Object... data) {
> +    public static <K, V> Map<String, V> toMap(Object... data) {
>          if (data == null) {
>              return null;
>          }
>          if (data.length == 1 && data[0] instanceof Map) {
>              // Fix for javac's broken type inferring
> -            return UtilGenerics.<K, V>checkMap(data[0]);
> +            return UtilGenerics.<String, V>checkMap(data[0]);
>          }
>          if (data.length % 2 == 1) {
>              throw new IllegalArgumentException("You must pass an even sized 
> array to the toMap method");
>          }
> -        Map<K, V> map = FastMap.newInstance();
> +        Map<String, V> map = FastMap.newInstance();
>          for (int i = 0; i < data.length; ) {
> -            map.put((K) data[i++], (V) data[i++]);
> +            map.put((String) data[i++], (V) data[i++]);
>          }
>          return map;
>      }

This is *not* the right way to fix whatever problem you are having.
Absolutely *not* right.

What error did you get?  Everything compiles for me.

Reply via email to