Commits

Anonymous committed 16ce066

Improve "No object in the CompoundRoot has a property named 'bar'" exception
Issue number: XW-223
Obtained from:
Submitted by:
Reviewed by:

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

Comments (0)

Files changed (2)

src/java/com/opensymphony/xwork/util/CompoundRootAccessor.java

 
         Boolean reportError = (Boolean) context.get(OgnlValueStack.REPORT_ERRORS_ON_NO_PROP);
 
-        final String msg = "No object in the CompoundRoot has a property named '" + name + "'.";
+        final String msg = "No object in the CompoundRoot has a publicly accessible property named '" + name + "' (no setter could be found).";
 
         if ((reportError != null) && (reportError.booleanValue())) {
             log.error(msg);

src/test/com/opensymphony/xwork/interceptor/ParametersInterceptorTest.java

         ActionProxy proxy = ActionProxyFactory.getFactory().createActionProxy("", MockConfigurationProvider.PARAM_INTERCEPTOR_ACTION_NAME, extraContext);
         proxy.execute();
         final String actionMessage = ""+((SimpleAction) proxy.getAction()).getActionMessages().toArray()[0];
-        assertTrue(actionMessage.indexOf("No object in the CompoundRoot has a property named 'not_a_property'")>-1);
+        assertTrue(actionMessage.indexOf("No object in the CompoundRoot has a publicly accessible property named 'not_a_property' (no setter could be found).") > -1);
     }
 
     public void testNonexistentParametersAreIgnoredInProductionMode() throws Exception {