Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.3.28, 2.3.29, 2.3.30
-
None
Description
Hello Struts Team,
we updated from Struts 2.3.24.x to 2.3.29.
We realized that we got some problems with parameters getting set into our Java actions. We are using Lombok to create getters and setters.
Example:
@Getter @Setter private String sSearch_contentTypeId;
This results in a generated setter name "setSSearch_contentTypeId".
With the Struts Version below 2.3.28, which used OGNL 3.0.6 this was no problem. With the latest Version of OGNL, 3.0.17, included since 2.3.28 of Struts, this setter is no longer found.
Reason for this is a change within the OGNL Code in "OgnlRuntime.java".
Old Line 1774:
String baseName = Character.toUpperCase(propertyName.charAt(0)) + propertyName.substring(1);
New Line 1871:
String baseName = capitalizeBeanPropertyName(propertyName);
This new functions handles thinks completely different cause if first char is lowercase and second char is uppercase it does not modfiy it.
Resulting in a not found setter.
Is this an intended change so that parameters are no longer allowed to be first letter lowercase, second letter uppercase?
Greetings Marco C.
Attachments
Issue Links
- duplicates
-
WW-4616 Unable to receive GET parameters with field name 'cId'
- Closed