myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r921408 - /myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/DefaultProxyHelper.java
Date Wed, 10 Mar 2010 15:45:27 GMT
Author: gpetracek
Date: Wed Mar 10 15:45:27 2010
New Revision: 921408

URL: http://svn.apache.org/viewvc?rev=921408&view=rev
Log:
cleanup

Modified:
    myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/DefaultProxyHelper.java

Modified: myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/DefaultProxyHelper.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/DefaultProxyHelper.java?rev=921408&r1=921407&r2=921408&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/DefaultProxyHelper.java
(original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/DefaultProxyHelper.java
Wed Mar 10 15:45:27 2010
@@ -22,7 +22,6 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
-import org.apache.myfaces.extensions.validator.util.ClassUtils;
 
 /**
  * @author Gerhard Petracek
@@ -50,31 +49,25 @@ public class DefaultProxyHelper implemen
     {
         if(isProxiedClass(currentClass))
         {
-            return ClassUtils.tryToLoadClassForName(getNameOfClass(currentClass));
+            return currentClass.getSuperclass();
         }
         return currentClass;
     }
 
-    public String getNameOfClass(Class proxiedClass)
+    public String getNameOfClass(Class currentClass)
     {
-        if (isProxiedClass(proxiedClass))
+        if (isProxiedClass(currentClass))
         {
-            String result = proxiedClass.getName().substring(0, proxiedClass.getName().indexOf("$"));
-
-            if(result.endsWith("_") && proxiedClass.getName().contains("javassist"))
-            {
-                return result.substring(0, result.length() - 1);
-            }
-            return result;
+            return currentClass.getSuperclass().getName();
         }
-        return proxiedClass.getName();
+        return currentClass.getName();
     }
 
-    public String getClassNameOfObject(Object proxiedObject)
+    public String getClassNameOfObject(Object object)
     {
-        if(proxiedObject != null)
+        if(object != null)
         {
-            return getNameOfClass(proxiedObject.getClass());
+            return getNameOfClass(object.getClass());
         }
         return null;
     }



Mime
View raw message