Skip to content

SPEL: Error message is useless at helping developer resolve problem actual problem, EL1027E:(pos 4): Indexing into type ... [SPR-8876] #13517

@spring-projects-issues

Description

@spring-projects-issues

Darryl L. Miles opened SPR-8876 and commented

After having used Spring Roo to produce a skeleton application to modify (therefore using the best coding conventions and project design).
When modifiying such a project I came into a situation that was difficult to solve from readying the Exception message.

org.springframework.expression.spel.SpelEvaluationException: EL1027E:(pos 4): Indexing into type 'com.example.MyParentClass' is not supported

org.springframework.expression.spel.ast.Indexer:174
in method => public TypedValue getValueInternal(ExpressionState state) throws EvaluationException
at line => throw new SpelEvaluationException(getStartPosition(),SpelMessage.INDEXING_NOT_SUPPORTED_FOR_TYPE, targetObjectTypeDescriptor.asString());

There is not enough information presented to the developer to have any idea about which thing is the problem.
The index/indexValue local variables look very useful at providing the developer anough information to be able to fix the problem.
So this bug request that such messages provide information to allow diagnosis of the problem from the message.

The only way to develop is to set a breakpoint and manually inspect the state of Spring internals before allowing it to throw the exception.


No further details from SPR-8876

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions