[ https://issues.apache.org/jira/browse/WW-5468?focusedWorklogId=937575&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-937575 ]
ASF GitHub Bot logged work on WW-5468: -------------------------------------- Author: ASF GitHub Bot Created on: 11/Oct/24 10:38 Start Date: 11/Oct/24 10:38 Worklog Time Spent: 10m Work Description: kusalk commented on PR #1071: URL: https://github.com/apache/struts/pull/1071#issuecomment-2407132158 It seems that the `java.beans.PropertyDescriptor` API will always return the getter method on the `ModelDriven` interface rather than the Action (I didn't actually realise this when I wrote this feature). This means it doesn't matter if `getModel` on the actual Action class is annotated or not, it will only ever check the interface method. To be honest, I don't mind this behaviour - what if we just exempt all model driven Actions from the annotation requirement? The `@StrutsParameter` requirement was designed to protect against random getters/setters on the Action class from being injected. But if an Action is using a dedicated model object (and the Action class is indeed not on the root of the ValueStack) it is already much safer. Here is my alternative solution for your consideration: f67f593b Issue Time Tracking ------------------- Worklog Id: (was: 937575) Time Spent: 1h 10m (was: 1h) > ModelDriven is not compatible with @StrutsParameter > --------------------------------------------------- > > Key: WW-5468 > URL: https://issues.apache.org/jira/browse/WW-5468 > Project: Struts 2 > Issue Type: Bug > Components: Core > Affects Versions: 7.0.0 > Reporter: Lukasz Lenart > Priority: Major > Fix For: 7.0.0 > > Time Spent: 1h 10m > Remaining Estimate: 0h > > Currently if a Struts webapp uses {{ModelDriven<T>}} it won't be possible to > use {{@StrutsParameter}} annotation on {{#getModel()}} getter. > Use rest-angular as example > https://github.com/apache/struts-examples/blob/master/rest-angular/src/main/resources/struts.xml#L13 -- This message was sent by Atlassian Jira (v8.20.10#820010)