This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: PR 8759


I'm checking this in.
This is the patch from PR 8759.

Tom

Index: ChangeLog
from  Gary Benson  <gbenson@redhat.com>

	For PR libgcj/8759:
	* java/beans/Introspector.java (flushCaches): New method.
	(flushFromCaches): Likewise.

Index: java/beans/Introspector.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/beans/Introspector.java,v
retrieving revision 1.3
diff -u -r1.3 Introspector.java
--- java/beans/Introspector.java 24 Mar 2002 21:32:14 -0000 1.3
+++ java/beans/Introspector.java 30 Nov 2002 04:33:56 -0000
@@ -1,5 +1,5 @@
 /* java.beans.Introspector
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2002 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -206,6 +206,32 @@
 	cachedInfo = getBeanInfo(beanClass,null);
 	beanInfoCache.put(beanClass,cachedInfo);
 	return cachedInfo;
+      }
+  }
+
+  /**
+   * Flush all of the Introspector's internal caches.
+   *
+   * @since 1.2
+   */
+  public static void flushCaches()
+  {
+    beanInfoCache.clear();
+  }
+
+  /**
+   * Flush the Introspector's internal cached information for a given
+   * class.
+   *
+   * @param clz the class to be flushed.
+   * @throws NullPointerException if clz is null.
+   * @since 1.2
+   */
+  public static void flushFromCaches(Class clz)
+  {
+    synchronized (clz)
+      {
+	beanInfoCache.remove(clz);
       }
   }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]