Author: hemapani
Date: Tue Jan  4 07:44:41 2011
New Revision: 1054928

URL: http://svn.apache.org/viewvc?rev=1054928&view=rev
Log:
revert the change done for https://issues.apache.org/jira/browse/AXIS2-4524

Modified:
    
axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java

Modified: 
axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=1054928&r1=1054927&r2=1054928&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
 Tue Jan  4 07:44:41 2011
@@ -20,6 +20,27 @@
 package org.apache.axis2.databinding.utils;
 
 
+import java.beans.BeanInfo;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Array;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamReader;
+
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMElement;
@@ -39,31 +60,9 @@ import org.apache.axis2.engine.ObjectSup
 import org.apache.axis2.util.Loader;
 import org.apache.axis2.util.StreamWrapper;
 
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-import java.beans.BeanInfo;
-import java.beans.IntrospectionException;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.Array;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
 
 public class BeanUtil {
-
     private static int nsCount = 1;
-    private static Map<String, BeanInfo> beanInfoMap = new HashMap<String, 
BeanInfo>();
 
     /**
      * To Serilize Bean object this method is used, this will create an object 
array using given
@@ -104,26 +103,18 @@ public class BeanUtil {
 
 
     private static BeanInfo getBeanInfo(Class beanClass, Class beanSuperclass) 
throws IntrospectionException {
-
-        String beanInfoKey;
-        if (beanSuperclass != null)
-            beanInfoKey = 
beanClass.getName().concat("|").concat(beanSuperclass.getName());
-        else
-            beanInfoKey = beanClass.getName();
-
-        BeanInfo beanInfo = beanInfoMap.get(beanInfoKey);
-        if (beanInfo == null) {
-            try {
-                if (beanSuperclass != null)
-                    beanInfo = Introspector.getBeanInfo(beanClass, 
beanSuperclass);
-                else
-                    beanInfo = Introspector.getBeanInfo(beanClass);
-            }
-            catch (IntrospectionException e) {
-                throw e;
-            }
-            beanInfoMap.put(beanInfoKey, beanInfo);
+        BeanInfo beanInfo; 
+        try {
+            if (beanSuperclass != null)
+               beanInfo = Introspector.getBeanInfo(beanClass, beanSuperclass);
+            else
+                beanInfo = Introspector.getBeanInfo(beanClass);
+        }
+        catch (IntrospectionException e) {
+            throw e;
         }
+
+         
         return beanInfo;
     }
 


Reply via email to