niallp      2004/07/11 17:55:45

  Modified:    beanutils/src/test/org/apache/commons/beanutils
                        TestBean.java
  Log:
  Fix for small Bug in TestBean - wrong Map being initialized
  
  Revision  Changes    Path
  1.21      +5 -5      
jakarta-commons/beanutils/src/test/org/apache/commons/beanutils/TestBean.java
  
  Index: TestBean.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/beanutils/src/test/org/apache/commons/beanutils/TestBean.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- TestBean.java     28 Feb 2004 13:18:36 -0000      1.20
  +++ TestBean.java     12 Jul 2004 00:55:45 -0000      1.21
  @@ -344,10 +344,10 @@
   
       public int getMappedIntProperty(String key) {
           // Create the map the very first time
  -        if (mappedProperty == null) {
  -            mappedProperty = new HashMap();
  -            mappedProperty.put("One", new Integer(1));
  -            mappedProperty.put("Two", new Integer(2));
  +        if (mappedIntProperty == null) {
  +            mappedIntProperty = new HashMap();
  +            mappedIntProperty.put("One", new Integer(1));
  +            mappedIntProperty.put("Two", new Integer(2));
           }
           Integer x = (Integer) mappedIntProperty.get(key);
           return ((x == null) ? 0 : x.intValue());
  
  
  

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

Reply via email to