struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yasserzamani <>
Subject [GitHub] struts pull request #118: [WW-4105] OgnlUtil improved in order to only setti...
Date Mon, 13 Feb 2017 11:34:41 GMT
Github user yasserzamani commented on a diff in the pull request:
    --- Diff: core/src/main/java/com/opensymphony/xwork2/interceptor/
    @@ -160,7 +160,20 @@ private void copyStack(ActionInvocation invocation, CompoundRoot
root) {
             Map<String, Object> ctxMap = invocation.getInvocationContext().getContextMap();
             for (Object object : list) {
                 if (shouldCopy(object)) {
    -                reflectionProvider.copy(object, invocation.getAction(), ctxMap, prepareExcludes(),
    +                String actionConfigClassName = invocation.getProxy().getConfig().getClassName();
    +                Object action = invocation.getAction();
    +                if (action.getClass().getName().equals(actionConfigClassName))
    +                    reflectionProvider.copy(object, action, ctxMap, prepareExcludes(),
includes, null);
    +                else {	//only setting properties defined in the given config class e.g.
to skip proxy properties (WW-4105)
    +                    Class <?> editable;
    +                    try {
    +                        editable =  Class.forName(actionConfigClassName);
    +                    } catch (ClassNotFoundException e) {
    +                        LOG.warn("An unexpected state. This may be due to a bug. Please
report this: ClassNotFoundException" + actionConfigClassName);
    --- End diff --
    I also fixed Indentations to use 4 spaces instead of tab, both in my current PRs and my
eclipse. Sorry, I'll be more careful about formatting in my next works

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message