Commits

Anonymous committed e23011c

XW-644 Exception build results that have parameters that don't map to setters

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@1835e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (1)

src/java/com/opensymphony/xwork2/ognl/OgnlUtil.java

     private final ConcurrentHashMap<Class, BeanInfo> beanInfoCache = new ConcurrentHashMap<Class, BeanInfo>();
 
     private TypeConverter defaultConverter;
+    static boolean devMode = false;
 
     @Inject
     public void setXWorkConverter(XWorkConverter conv) {
         this.defaultConverter = new OgnlTypeConverterWrapper(conv);
     }
 
+    @Inject("devMode")
+    public static void setDevMode(String mode) {
+        devMode = "true".equals(mode);
+    }
+    
     /**
      * Sets the object's properties using the default type converter, defaulting to not throw
      * exceptions for problems setting the properties.
             if (throwPropertyExceptions) {
                 throw new ReflectionException(msg, exception);
             } else {
-                LOG.warn(msg, exception);
+                if (devMode) {
+                    LOG.warn(msg, exception);
+                }
             }
         }
     }