diff options
author | John Keiser <shalom@gnu.org> | 1998-08-01 18:03:09 +0000 |
---|---|---|
committer | John Keiser <shalom@gnu.org> | 1998-08-01 18:03:09 +0000 |
commit | c8a98f59f526eb1842e578a5c1a9a54733c1aba5 (patch) | |
tree | 1f388101fb9269fad425c4f7350f672d62e8f264 /java/beans/Introspector.java | |
parent | 7d1fbd2f8d2332915e7721dade5f59cc055abbb4 (diff) | |
download | classpath-c8a98f59f526eb1842e578a5c1a9a54733c1aba5.tar.gz |
Moved synchronized keyword to appropriate place.
Diffstat (limited to 'java/beans/Introspector.java')
-rw-r--r-- | java/beans/Introspector.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/java/beans/Introspector.java b/java/beans/Introspector.java index 841b60f3b..9f4943e2f 100644 --- a/java/beans/Introspector.java +++ b/java/beans/Introspector.java @@ -158,7 +158,6 @@ import gnu.java.lang.*; public class Introspector { static String[] beanInfoSearchPath = {"gnu.java.beans.info", "sun.beans.infos"}; static Hashtable beanInfoCache = new Hashtable(); - static BeanInfo theSimpleBeanInfo = new SimpleBeanInfo(); /** Get the BeanInfo for class <CODE>beanClass</CODE>, ** first by looking for explicit information, next by @@ -169,6 +168,7 @@ public class Introspector { **/ public static BeanInfo getBeanInfo(Class beanClass) throws IntrospectionException { BeanInfo cachedInfo; + synchronized(beanClass) { cachedInfo = (BeanInfo)beanInfoCache.get(beanClass); if(cachedInfo != null) { return cachedInfo; @@ -176,6 +176,7 @@ public class Introspector { cachedInfo = getBeanInfo(beanClass,null); beanInfoCache.put(beanClass,cachedInfo); return cachedInfo; + } } /** Get the BeanInfo for class <CODE>beanClass</CODE>, @@ -188,11 +189,6 @@ public class Introspector { ** @return the BeanInfo object representing the class. **/ public static BeanInfo getBeanInfo(Class beanClass, Class stopClass) throws IntrospectionException { - if(beanClass == null) { - return null; - } - synchronized(beanClass) { - ExplicitInfo explicit = new ExplicitInfo(beanClass,stopClass); IntrospectionIncubator ii = new IntrospectionIncubator(); @@ -243,7 +239,6 @@ public class Introspector { currentInfo.setIcons(explicit.im); return currentInfo.getBeanInfo(); - } // end synchronized(beanClass) } /** Get the search path for BeanInfo classes. |