struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yasserzamani <...@git.apache.org>
Subject [GitHub] struts issue #133: WW-4105 Considers config time class in actions chain
Date Mon, 24 Apr 2017 07:19:14 GMT
Github user yasserzamani commented on the issue:

    https://github.com/apache/struts/pull/133
  
    However, today I found I should improve above pseudocode to following, because maybe user
himself has extended a class and wants to use method1 from extended class in action1 and use
method2 from super class in action2 :)
    ```
    className=actionConfig.getClassName();
    if(null==className) className=action.getClass().getName();
    configClass=objectfactory.getInstanceClass(className);
    if(!configClass.getName().equals(className))
    {
    methodName = actionConfig.getMethodName();
    if(null==methodName) methodName=ActionConfig.DEFAULT_METHOD;
    method=action.getClass().getMethod(methodName);
    configClass=method.getDeclaringClass();
    }
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message