Skip to content

SpEL parsing issue in Query annotation #1320

Closed
@elmuerte

Description

@elmuerte

Describe the bug

I have the following SpEL expression in a @Query annotation

group by r having count(p) = ?#{[1].size().longValue()}

The input parameter is a Set<String>.

This produces the following error marker in Eclipse:

SPEL: extraneous input '[' expecting {'++', '+', '--', '-', '(', '#', '@', '^[', '![', '!', '&', '?[', '$[', LCURLY, 'true', 'false', 'new', 'null', 'T', IDENTIFIER, NUMERIC_LITERAL, STRING_LITERAL}

To Reproduce

Create a @Query where the value contains a SpEL expression referencing an input parameter, e.g. ?#{[1]}

I'm using Eclipse 2024-06 with STS 4.24

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions