jefferyxhy commented on code in PR #912:
URL: https://github.com/apache/struts/pull/912#discussion_r1560435674
##########
core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java:
##########
@@ -583,11 +590,10 @@ public ActionConfig getActionConfig(String namespace,
String name) {
}
// fail over to empty namespace
- if (config == null && StringUtils.isNotBlank(namespace)) {
+ if (config == null && StringUtils.isNotBlank(namespace) &&
("/".equals(namespace) || fallbackToEmptyNamespace)) {
Review Comment:
Done. Thanks
##########
core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java:
##########
@@ -459,9 +460,12 @@ protected synchronized RuntimeConfiguration
buildRuntimeConfiguration() throws C
boolean appendNamedParameters = Boolean.parseBoolean(
container.getInstance(String.class,
StrutsConstants.STRUTS_MATCHER_APPEND_NAMED_PARAMETERS)
);
+ boolean fallbackToEmptyNamespace = Boolean.parseBoolean(
+ Optional.ofNullable(container.getInstance(String.class,
StrutsConstants.STRUTS_ACTION_CONFIG_FALLBACK_TO_EMPTY_NAMESPACE)).orElse("true")
Review Comment:
Updated. Thanks
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]