You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by de...@apache.org on 2018/05/08 12:49:10 UTC

[myfaces] 10/14: revert (wrong branch)

This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch 1_1_4
in repository https://gitbox.apache.org/repos/asf/myfaces.git

commit c44064691f5a8a38886d81b9e2f5f9938eeded2f
Author: Matthias Wessendorf <ma...@apache.org>
AuthorDate: Thu Aug 17 05:10:50 2006 +0000

    revert (wrong branch)
---
 .../apache/myfaces/el/PropertyResolverImpl.java    | 36 +++++++---------------
 1 file changed, 11 insertions(+), 25 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/el/PropertyResolverImpl.java b/impl/src/main/java/org/apache/myfaces/el/PropertyResolverImpl.java
index e813136..527790f 100755
--- a/impl/src/main/java/org/apache/myfaces/el/PropertyResolverImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/el/PropertyResolverImpl.java
@@ -389,7 +389,7 @@ public class PropertyResolverImpl extends PropertyResolver
         if (m == null)
         {
             throw new PropertyNotFoundException(
-                getMessage(base, name)+ " (no write method for property!)"); 
+                "Bean: " + base.getClass().getName() + ", property: " + name);
         }
 
         // Check if the concrete class of this method is accessible and if not
@@ -398,7 +398,7 @@ public class PropertyResolverImpl extends PropertyResolver
         if (m == null)
         {
             throw new PropertyNotFoundException(
-                getMessage(base, name) + " (not accessible!)");
+                "Bean: " + base.getClass().getName() + ", property: " + name + " (not accessible!)");
         }
 
         try
@@ -407,27 +407,11 @@ public class PropertyResolverImpl extends PropertyResolver
         }
         catch (Throwable t)
         {
-            log.debug("Exception while invoking setter method.",t);
-            throw new EvaluationException(getMessage(base, name, newValue, m), t);
+            throw new EvaluationException("Bean: "
+                + base.getClass().getName() + ", property: " + name, t);
         }
     }
 
-    private static String getMessage(Object base, String name, Object newValue, Method m)
-    {
-        return "Bean: "
-            + base.getClass().getName() + ", property: " + name +", newValue: "+(newValue==null?" null ":newValue)+
-                ",newValue class: "+(newValue==null?" null ":newValue.getClass().getName())+" method parameter class: "
-                +((m.getParameterTypes()!=null&&m.getParameterTypes().length>0)
-                    ?m.getParameterTypes()[0].getName():"null");
-
-    }
-
-    private static String getMessage(Object base, String name)
-    {
-        return "Bean: "
-            + base.getClass().getName() + ", property: " + name;
-    }
-
     public static Object getProperty(Object base, String name)
     {
         PropertyDescriptor propertyDescriptor =
@@ -437,7 +421,7 @@ public class PropertyResolverImpl extends PropertyResolver
         if (m == null)
         {
             throw new PropertyNotFoundException(
-                getMessage(base, name));
+                "Bean: " + base.getClass().getName() + ", property: " + name);
         }
 
         // Check if the concrete class of this method is accessible and if not
@@ -446,7 +430,7 @@ public class PropertyResolverImpl extends PropertyResolver
         if (m == null)
         {
             throw new PropertyNotFoundException(
-                getMessage(base, name) + " (not accessible!)");
+                "Bean: " + base.getClass().getName() + ", property: " + name + " (not accessible!)");
         }
 
         try
@@ -455,7 +439,8 @@ public class PropertyResolverImpl extends PropertyResolver
         }
         catch (Throwable t)
         {
-            throw new EvaluationException(getMessage(base, name), t);
+            throw new EvaluationException("Bean: "
+                + base.getClass().getName() + ", property: " + name, t);
         }
     }
 
@@ -472,7 +457,8 @@ public class PropertyResolverImpl extends PropertyResolver
         }
         catch (IntrospectionException e)
         {
-            throw new PropertyNotFoundException(getMessage(base, name), e);
+            throw new PropertyNotFoundException("Bean: "
+                + base.getClass().getName() + ", property: " + name, e);
         }
 
         return propertyDescriptor;
@@ -499,4 +485,4 @@ public class PropertyResolverImpl extends PropertyResolver
             + ", property: " + propertyName);
     }
 
-}
\ No newline at end of file
+}

-- 
To stop receiving notification emails like this one, please contact
deki@apache.org.