[
https://issues.apache.org/jira/browse/WW-5440?focusedWorklogId=925819&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-925819
]
ASF GitHub Bot logged work on WW-5440:
--------------------------------------
Author: ASF GitHub Bot
Created on: 14/Jul/24 12:08
Start Date: 14/Jul/24 12:08
Worklog Time Spent: 10m
Work Description: kusalk commented on code in PR #986:
URL: https://github.com/apache/struts/pull/986#discussion_r1677121558
##########
plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java:
##########
@@ -98,16 +104,17 @@ public PropertyDescriptor[] getProperties() {
return properties;
}
+ @Override
public String execute() throws Exception {
super.execute();
config = configHelper.getActionConfig(namespace, actionName);
- actionNames = new
TreeSet<String>(configHelper.getActionNames(namespace));
+ actionNames = new TreeSet<>(configHelper.getActionNames(namespace));
try {
Object action = objectFactory.buildAction(actionName, namespace,
config, null);
properties = reflectionProvider.getPropertyDescriptors(action);
} catch (Exception e) {
- LOG.error("Unable to get properties for action " + actionName, e);
- addActionError("Unable to retrieve action properties: " +
e.toString());
+ LOG.error("Unable to get properties for action {}", actionName, e);
Review Comment:
So I double checked this because IntelliJ insisted this was correct despite
the JavaDoc for the method suggesting it was incorrect. Turns out Log4J 2 will
actually log this correctly as it will identify that the last argument is an
exception (also tested locally). Here is the relevant Log4J 2 code -
https://github.com/apache/logging-log4j2/blob/rel/2.23.1/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableParameterizedMessage.java#L128
Issue Time Tracking
-------------------
Worklog Id: (was: 925819)
Time Spent: 1h 20m (was: 1h 10m)
> Fix OGNL allowlist compatibility with Convention plugin
> -------------------------------------------------------
>
> Key: WW-5440
> URL: https://issues.apache.org/jira/browse/WW-5440
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - Convention
> Affects Versions: 6.4.0
> Reporter: Kusal Kithul-Godage
> Priority: Minor
> Fix For: 6.6.0, 7.0.0
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)