[ 
https://issues.apache.org/jira/browse/WW-5000?focusedWorklogId=531578&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-531578
 ]

ASF GitHub Bot logged work on WW-5000:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Jan/21 23:28
            Start Date: 05/Jan/21 23:28
    Worklog Time Spent: 10m 
      Work Description: JCgH4164838Gh792C124B5 commented on a change in pull 
request #464:
URL: https://github.com/apache/struts/pull/464#discussion_r552259692



##########
File path: core/src/main/java/org/apache/struts2/StrutsConstants.java
##########
@@ -250,7 +250,7 @@
     public static final String STRUTS_EL_THROW_EXCEPTION = 
"struts.el.throwExceptionOnFailure";
 
     /** Logs properties that are not found (very verbose) */
-    public static final String STRUTS_LOG_MISSING_PROPERTIES = 
"struts.ognl.logMissingProperties";

Review comment:
       Hi Lukasz.
   It is possible (if unlikely) that someone has been referencing 
`STRUTS_LOG_MISSING_PROPERTIES` from the constants file, and removing it will 
cause breakage.
   Probably not a big concern, but maybe consider leave the old constant, have 
it set to the new one's value, and just mark the old one as deprecated ?
   Something like:
   ```
   /** Logs properties that are not found (very verbose) */
   @deprecated as of 2.6.  Use {@link STRUTS_OGNL_LOG_MISSING_PROPERTIES} 
instead.
   public static final String STRUTS_LOG_MISSING_PROPERTIES = 
STRUTS_OGNL_LOG_MISSING_PROPERTIES;
   
   /** Logs properties that are not found (very verbose) */
   public static final String STRUTS_OGNL_LOG_MISSING_PROPERTIES = 
"struts.ognl.logMissingProperties";
   ```
   It might not really be necessary, but just something to consider.  :)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 531578)
    Time Spent: 1h 20m  (was: 1h 10m)

> Replace string literals with proper constants in @Inject
> --------------------------------------------------------
>
>                 Key: WW-5000
>                 URL: https://issues.apache.org/jira/browse/WW-5000
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Lukasz Lenart
>            Priority: Minor
>             Fix For: 2.6
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> In many places string literals are used instead of a proper reference to a 
> constant.
> {noformat}
> @Inject(value = "struts.xwork.chaining.copyMessages", required = false)
> @Inject(value = "struts.xwork.chaining.copyFieldErrors", required = false)
> @Inject(value = "struts.xwork.chaining.copyErrors", required = false)
> @Inject(value = "struts.javatemplates.defaultTemplateType", required = false)
> @Inject(value = "struts.javatemplates.customThemes", required = false)
> @Inject(value = "struts.objectFactory.cdi.jndiKey", required = false)
> @Inject(value = "enableAopSupport", required = false)
> @Inject(value = "struts.oval.validateJPAAnnotations")
> @Inject(value = "xwork.autoGrowCollectionLimit", required = false)
> @Inject(value = "logMissingProperties", required = false)
> @Inject(value="objectFactory.classloader", required=false)
> @Inject(value="allowStaticMethodAccess", required=false)
> @Inject(value="applicationContextPath",required=false)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to