Skip to content

Conversation

@sslavic
Copy link
Contributor

@sslavic sslavic commented Mar 3, 2012

Before this fix ReflectivePropertyAccessor was not able to find write
method for valid property name that has first character in lower case
and second character in upper case. Write method lookup would always
convert first character of property name to upper case which is not
compliant with JavaBean specification. As consequence this caused an
unwanted behavior in SpEL when obtaining values of expressions that
reference such JavaBean properties.

As of this change, write method lookup skips conversion of property
name first character to upper case when property name is longer than
one character and second character is in upper case. This also fixes
mentioned bug in SpEL value resolution.

Issue: SPR-9123

I have signed and agree to the terms in the SpringSource Individual Contributor License Agreement.

Before this fix ReflectivePropertyAccessor was not able to find write
method for valid property name that has first character in lower case
and second character in upper case. Write method lookup would always
convert first character of property name to upper case which is not
compliant with JavaBean specification. As consequence this caused an
unwanted behavior in SpEL when obtaining values of expressions that
reference such JavaBean properties.

As of this change, write method lookup skips conversion of property
name first character to upper case when property name is longer than
one character and second character is in upper case. This also fixes
mentioned bug in SpEL value resolution.

Issue: SPR-9123
cbeams added a commit that referenced this pull request May 17, 2012
* SPR-9123:
  Fix SpEL JavaBean compliance
@cbeams
Copy link
Contributor

cbeams commented May 17, 2012

Hey Stevo, a solid implementation as usual. Thanks, and this is now merged. Just a couple notes on what I did before actually merging it:

  • fixed trailing whitespace issues
  • fixed } else { syntax => else { (such that else is on a newline)

@cbeams cbeams closed this May 17, 2012
rwinch pushed a commit to rwinch/spring-framework that referenced this pull request Jun 20, 2016
Flux and Mono are used both for implementation and exposed at API
level to express 1 versus N semantic and to provide default Rx
operators:
- Flux<T> for multiple values Publisher (issue spring-projects#48)
- Mono<T> for single value Publisher (issue spring-projects#50)
- Mono<Void> for Publisher with no value (issue spring-projects#49)
rwinch pushed a commit to rwinch/spring-framework that referenced this pull request Jul 13, 2016
Flux and Mono are used both for implementation and exposed at API
level to express 1 versus N semantic and to provide default Rx
operators:
- Flux<T> for multiple values Publisher (issue spring-projects#48)
- Mono<T> for single value Publisher (issue spring-projects#50)
- Mono<Void> for Publisher with no value (issue spring-projects#49)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants