hlship      2004/09/07 06:17:20

  Modified:    framework/src/java/org/apache/hivemind/util Tag: branch-1-0
                        PropertyUtils.java
               .        Tag: branch-1-0 status.xml
               framework/src/java/org/apache/hivemind/test Tag: branch-1-0
                        HiveMindTestCase.java
  Log:
  Add clearCache() method to PropertyUtils.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.7.2.1   +13 -5     
jakarta-hivemind/framework/src/java/org/apache/hivemind/util/PropertyUtils.java
  
  Index: PropertyUtils.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/util/PropertyUtils.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- PropertyUtils.java        6 Aug 2004 17:03:31 -0000       1.7
  +++ PropertyUtils.java        7 Sep 2004 13:17:20 -0000       1.7.2.1
  @@ -93,11 +93,11 @@
           return a.getPropertyType(target, propertyName);
       }
   
  -     /**
  -      * Returns the [EMAIL PROTECTED] PropertyAdaptor} for the given target 
object and property name.
  -      * 
  -      * @throws ApplicationRuntimeException if the property does not exist.
  -      */
  +    /**
  +     * Returns the [EMAIL PROTECTED] PropertyAdaptor} for the given target 
object and property name.
  +     * 
  +     * @throws ApplicationRuntimeException if the property does not exist.
  +     */
       public static PropertyAdaptor getPropertyAdaptor(Object target, String 
propertyName)
       {
           ClassAdaptor a = getAdaptor(target);
  @@ -157,6 +157,14 @@
                   null,
                   ex);
           }
  +    }
  +
  +     /**
  +      * Clears all cached information.
  +      */
  +    public static synchronized void clearCache()
  +    {
  +        _classAdaptors.clear();
       }
   
   }
  
  
  
  No                   revision
  No                   revision
  1.57.2.4  +3 -0      jakarta-hivemind/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/status.xml,v
  retrieving revision 1.57.2.3
  retrieving revision 1.57.2.4
  diff -u -r1.57.2.3 -r1.57.2.4
  --- status.xml        5 Sep 2004 13:08:26 -0000       1.57.2.3
  +++ status.xml        7 Sep 2004 13:17:20 -0000       1.57.2.4
  @@ -49,6 +49,9 @@
         <action type="fix" dev="HLS" fixes-bug="HIVEMIND-10" due-to="James 
Carman">
           Tweak HiveMind to work properly in a JavaWebStart application.
         </action>
  +      <action type="add" dev="HLS">
  +        Add <code>clearCache()</code> method to <code>PropertyUtils</code>.
  +      </action>
       </release>
     
       <release version="1.0-rc-1" date="Aug 25 2004">
  
  
  
  No                   revision
  No                   revision
  1.12.2.1  +5 -1      
jakarta-hivemind/framework/src/java/org/apache/hivemind/test/HiveMindTestCase.java
  
  Index: HiveMindTestCase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/test/HiveMindTestCase.java,v
  retrieving revision 1.12
  retrieving revision 1.12.2.1
  diff -u -r1.12 -r1.12.2.1
  --- HiveMindTestCase.java     19 Aug 2004 23:24:55 -0000      1.12
  +++ HiveMindTestCase.java     7 Sep 2004 13:17:20 -0000       1.12.2.1
  @@ -32,6 +32,7 @@
   import org.apache.hivemind.impl.LocationImpl;
   import org.apache.hivemind.impl.RegistryBuilder;
   import org.apache.hivemind.util.ClasspathResource;
  +import org.apache.hivemind.util.PropertyUtils;
   import org.apache.hivemind.util.URLResource;
   import org.apache.log4j.Level;
   import org.apache.log4j.LogManager;
  @@ -145,7 +146,8 @@
   
       /**
        * Removes the [EMAIL PROTECTED] StoreAppender} that may have been setup 
by
  -     * [EMAIL PROTECTED] #interceptLogging(String)}.
  +     * [EMAIL PROTECTED] #interceptLogging(String)}. Also, invokes
  +     * [EMAIL PROTECTED] 
org.apache.hivemind.util.PropertyUtils#clearCache()}.
        */
       protected void tearDown() throws Exception
       {
  @@ -160,6 +162,8 @@
               logger.setAdditivity(true);
               logger.removeAllAppenders();
           }
  +
  +        PropertyUtils.clearCache();
       }
   
       /**
  
  
  

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

Reply via email to