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

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

                Author: ASF GitHub Bot
            Created on: 04/Jan/21 16:41
            Start Date: 04/Jan/21 16:41
    Worklog Time Spent: 10m 
      Work Description: sepe81 commented on a change in pull request #464:
URL: https://github.com/apache/struts/pull/464#discussion_r551425829



##########
File path: core/src/main/java/com/opensymphony/xwork2/ObjectFactory.java
##########
@@ -68,7 +69,7 @@ public void setContainer(Container container) {
         this.container = container;
     }
 
-    @Inject(value="objectFactory.classloader", required=false)
+    @Inject(value= StrutsConstants.STRUTS_OBJECT_FACTORY_CLASSLOADER, 
required=false)

Review comment:
       ```suggestion
       @Inject(value=StrutsConstants.STRUTS_OBJECT_FACTORY_CLASSLOADER, 
required=false)
   ```

##########
File path: 
core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
##########
@@ -284,7 +284,7 @@ protected Container 
createBootstrapContainer(List<ContainerProvider> providers)
         builder.factory(ValueSubstitutor.class, EnvsValueSubstitutor.class, 
Scope.SINGLETON);
 
         builder.constant(StrutsConstants.STRUTS_DEVMODE, "false");
-        builder.constant(StrutsConstants.STRUTS_LOG_MISSING_PROPERTIES, 
"false");
+        builder.constant(StrutsConstants.STRUTS_OGNL_LOG_MISSING_PROPERTIES, 
"false");

Review comment:
       Does this mean, the OGNL log constant is preferred over the non OGNL 
constant?

##########
File path: core/src/main/java/org/apache/struts2/StrutsConstants.java
##########
@@ -346,4 +346,9 @@
 
     /** See {@link 
com.opensymphony.xwork2.config.impl.AbstractMatcher#appendNamedParameters */
     public static final String STRUTS_MATCHER_APPEND_NAMED_PARAMETERS = 
"struts.matcher.appendNamedParameters";
+
+    public static final String STRUTS_CHAINING_COPY_ERRORS = 
"struts.chaining.copyErrors";

Review comment:
       I guess according to 
https://issues.apache.org/jira/browse/WW-5000?focusedCommentId=17257465&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17257465
 the removal of `xwork.` is intentional?
   
   struts.xwork.chaining.copyErrors gets struts.chaining.copyErrors

##########
File path: 
core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
##########
@@ -284,7 +284,7 @@ protected Container 
createBootstrapContainer(List<ContainerProvider> providers)
         builder.factory(ValueSubstitutor.class, EnvsValueSubstitutor.class, 
Scope.SINGLETON);
 
         builder.constant(StrutsConstants.STRUTS_DEVMODE, "false");
-        builder.constant(StrutsConstants.STRUTS_LOG_MISSING_PROPERTIES, 
"false");
+        builder.constant(StrutsConstants.STRUTS_OGNL_LOG_MISSING_PROPERTIES, 
"false");

Review comment:
       Oh, I see it is a rename under 
https://github.com/apache/struts/pull/464/files#diff-2de2f780034a74f8de7c95a0a38f6bea1c97cff74d7060064f28dc6069a24a44




----------------------------------------------------------------
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: 530756)
    Time Spent: 40m  (was: 0.5h)

> 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: 40m
>  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