struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Czollmann (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (WW-4668) Issue with Struts2 Request Parameters after update to Struts 2.3.29
Date Mon, 25 Jul 2016 12:32:20 GMT

     [ https://issues.apache.org/jira/browse/WW-4668?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Marco Czollmann updated WW-4668:
--------------------------------
    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.

  was:
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.

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.


> Issue with Struts2 Request Parameters after update to Struts 2.3.29
> -------------------------------------------------------------------
>
>                 Key: WW-4668
>                 URL: https://issues.apache.org/jira/browse/WW-4668
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Value Stack
>    Affects Versions: 2.3.28, 2.3.29, 2.3.30
>            Reporter: Marco Czollmann
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message