Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.14.3
    • Fix Version/s: 2.5.10
    • Component/s: Core Actions
    • Labels:
      None

      Description

      ActionSupport is base class for actions. Actions cannot (or at least shouldn't) use ActionSupport.LOG because localisation source of messages is much harder in this situation. When ActionSuport.LOG is protected, some programmers might accidentally use this instance (LOG is popular name for loggers).

        Activity

        Hide
        maurizio.cucchiara Maurizio Cucchiara added a comment -

        Nothing to reject about the issue.

        Lukasz Lenart it will break the backward compatibility, so 2.3.16 could not be the right version.

        Show
        maurizio.cucchiara Maurizio Cucchiara added a comment - Nothing to reject about the issue. Lukasz Lenart it will break the backward compatibility, so 2.3.16 could not be the right version.
        Hide
        lukaszlenart Lukasz Lenart added a comment -
        Show
        lukaszlenart Lukasz Lenart added a comment - Thanks Maurizio Cucchiara
        Hide
        mhankus Mirek Hankus added a comment - - edited

        Please fix also other classes, MethodFilterInterceptor also uses protected log, and ValidationInterceptor uses its own LOG and log from MethodFilterInterceptor, so you have code like

        if (log.isDebugEnabled()) {
                    log.debug("Validating "
                            + invocation.getProxy().getNamespace() + "/" + invocation.getProxy().getActionName() + " with method "+ method +".");
        }
        

        and

         if (LOG.isDebugEnabled()) {
                        LOG.debug("Invoking validate() on action "+validateable);
         }
        

        so, good luck with logger configuration with this class.

        Show
        mhankus Mirek Hankus added a comment - - edited Please fix also other classes, MethodFilterInterceptor also uses protected log, and ValidationInterceptor uses its own LOG and log from MethodFilterInterceptor, so you have code like if (log.isDebugEnabled()) { log.debug( "Validating " + invocation.getProxy().getNamespace() + "/" + invocation.getProxy().getActionName() + " with method " + method + "." ); } and if (LOG.isDebugEnabled()) { LOG.debug( "Invoking validate() on action " +validateable); } so, good luck with logger configuration with this class.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 3ce21403ee3df02aba11ae32c5e7ca54875ad220 in struts's branch refs/heads/master from Lukasz Lenart
        [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=3ce2140 ]

        WW-4102 Reduces LOG visibility

        Show
        jira-bot ASF subversion and git services added a comment - Commit 3ce21403ee3df02aba11ae32c5e7ca54875ad220 in struts's branch refs/heads/master from Lukasz Lenart [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=3ce2140 ] WW-4102 Reduces LOG visibility
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Struts-JDK7-master #574 (See https://builds.apache.org/job/Struts-JDK7-master/574/)
        WW-4102 Reduces LOG visibility (lukaszlenart: rev 3ce21403ee3df02aba11ae32c5e7ca54875ad220)

        • (edit) core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
        • (edit) plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ListValidatorsAction.java
        • (edit) core/src/main/java/com/opensymphony/xwork2/interceptor/ExceptionMappingInterceptor.java
        • (edit) core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.java
        • (edit) plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowJarsAction.java
        • (edit) core/src/main/java/org/apache/struts2/interceptor/TokenInterceptor.java
        • (edit) core/src/test/java/com/opensymphony/xwork2/interceptor/TimerInterceptorTest.java
        • (edit) core/src/main/java/com/opensymphony/xwork2/interceptor/TimerInterceptor.java
        • (edit) core/src/main/java/com/opensymphony/xwork2/validator/ValidationInterceptor.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Struts-JDK7-master #574 (See https://builds.apache.org/job/Struts-JDK7-master/574/ ) WW-4102 Reduces LOG visibility (lukaszlenart: rev 3ce21403ee3df02aba11ae32c5e7ca54875ad220) (edit) core/src/main/java/com/opensymphony/xwork2/ActionSupport.java (edit) plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ListValidatorsAction.java (edit) core/src/main/java/com/opensymphony/xwork2/interceptor/ExceptionMappingInterceptor.java (edit) core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.java (edit) plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowJarsAction.java (edit) core/src/main/java/org/apache/struts2/interceptor/TokenInterceptor.java (edit) core/src/test/java/com/opensymphony/xwork2/interceptor/TimerInterceptorTest.java (edit) core/src/main/java/com/opensymphony/xwork2/interceptor/TimerInterceptor.java (edit) core/src/main/java/com/opensymphony/xwork2/validator/ValidationInterceptor.java

          People

          • Assignee:
            lukaszlenart Lukasz Lenart
            Reporter:
            soldierkam Marcin Kamionowski
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development