You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by he...@apache.org on 2004/09/20 11:56:51 UTC

cvs commit: jakarta-commons/configuration/src/java/org/apache/commons/configuration ConfigurationMap.java

henning     2004/09/20 02:56:51

  Modified:    configuration/src/java/org/apache/commons/configuration
                        ConfigurationMap.java
  Log:
  Sh*t, asleep at the wheel.
  
  Remove some obvious "ClassCastExceptions ye here".
  
  Revision  Changes    Path
  1.5       +4 -3      jakarta-commons/configuration/src/java/org/apache/commons/configuration/ConfigurationMap.java
  
  Index: ConfigurationMap.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/ConfigurationMap.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ConfigurationMap.java	20 Sep 2004 09:48:40 -0000	1.4
  +++ ConfigurationMap.java	20 Sep 2004 09:56:51 -0000	1.5
  @@ -65,8 +65,9 @@
        */
       public Object put(Object key, Object value)
       {
  -        Object old = configuration.getProperty((String) key);
  -        configuration.setProperty((String) key,value);
  +        String strKey = String.valueOf(key);
  +        Object old = configuration.getProperty(strKey);
  +        configuration.setProperty(strKey, value);
           return old;
       }
   
  @@ -75,7 +76,7 @@
        */
       public Object get(Object key)
       {
  -        return configuration.getProperty((String) key);
  +        return configuration.getProperty(String.valueOf(key));
       }
   
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org