This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: PR 8759
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 29 Nov 2002 21:33:49 -0700
- Subject: Patch: FYI: PR 8759
- Reply-to: tromey at redhat dot com
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);
}
}