Commit 1f28bdf
Fix SpEL JavaBean compliance
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-91231 parent 2503b7e commit 1f28bdf
File tree
2 files changed
+30
-5
lines changed- spring-expression/src
- main/java/org/springframework/expression/spel/support
- test/java/org/springframework/expression/spel/support
2 files changed
+30
-5
lines changedLines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
286 | | - | |
| 285 | + | |
287 | 286 | | |
288 | 287 | | |
289 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
290 | 296 | | |
291 | | - | |
| 297 | + | |
292 | 298 | | |
293 | 299 | | |
294 | 300 | | |
295 | 301 | | |
296 | 302 | | |
297 | 303 | | |
298 | 304 | | |
299 | | - | |
| 305 | + | |
300 | 306 | | |
301 | 307 | | |
302 | 308 | | |
| |||
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
322 | 332 | | |
323 | 333 | | |
324 | 334 | | |
| |||
406 | 416 | | |
407 | 417 | | |
408 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
409 | 422 | | |
410 | 423 | | |
411 | 424 | | |
| |||
415 | 428 | | |
416 | 429 | | |
417 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
418 | 437 | | |
419 | 438 | | |
420 | 439 | | |
| |||
0 commit comments