Skip to content

Spel parser is not able to resolve bean id variable when it is passed as parameter to a static method. [SPR-5584] #10255

@spring-projects-issues

Description

@spring-projects-issues

jason bayk opened SPR-5584 and commented

<bean id="A" class="...">
<property name="a" value="4"/>
</bean>
<bean id="B" class="...">
<property name="b" value=" #{T(Math).sqrt(4)}"/>
</bean>

The above bean definition works as expected resolving value of the property "b" to 2.

However, the following definition fails on expression parsing:

<bean id="B" class="...">
<property name="b" value=" #{T(Math).sqrt(A.a)}"/>
</bean>

The error is:
Field or property 'A' cannot be found on object of type 'java.lang.Math'


Affects: 3.0 M2

Reference URL: http://forum.springsource.org/showthread.php?p=231886#post231886

Attachments:

Issue Links:

1 votes, 1 watchers

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)status: duplicateA duplicate of another issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions