Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qute: bug in expression parser with spaces #21858

Closed
FroMage opened this issue Dec 1, 2021 · 1 comment · Fixed by #22036
Closed

Qute: bug in expression parser with spaces #21858

FroMage opened this issue Dec 1, 2021 · 1 comment · Fixed by #22036
Assignees
Labels
area/qute The template engine kind/bug Something isn't working
Milestone

Comments

@FroMage
Copy link
Member

FroMage commented Dec 1, 2021

Describe the bug

I can call a tag with no spaces between parameters of the following method call:

            {#form uri:PersonOrGroups.accept(personOrGroup.id,global:requestUrl)}
            {/form}

But if I add a space between the parameters:

            {#form uri:PersonOrGroups.accept(personOrGroup.id, global:requestUrl)}
            {/form}

I'm getting this error:

Caused by: io.quarkus.qute.TemplateException: Parser error in template [tags/votePersonOrGroup.html] on line 7: invalid virtual method in {uri:PersonOrGroups.accept(personOrGroup.id,}
	at io.quarkus.qute.Parser.parserError(Parser.java:505)
	at io.quarkus.qute.Expressions.parseVirtualMethodParams(Expressions.java:40)
	at io.quarkus.qute.Parser.createPart(Parser.java:784)
	at io.quarkus.qute.Parser.parseExpression(Parser.java:767)
	at io.quarkus.qute.Parser.apply(Parser.java:840)
	at io.quarkus.qute.Parser.apply(Parser.java:34)
	at io.quarkus.qute.SectionBlock$Builder.addExpression(SectionBlock.java:168)
	at io.quarkus.qute.UserTagSectionHelper$Factory.initializeBlock(UserTagSectionHelper.java:92)
	at io.quarkus.qute.Parser.flushTag(Parser.java:434)
	at io.quarkus.qute.Parser.tag(Parser.java:295)
	at io.quarkus.qute.Parser.processCharacter(Parser.java:202)
	at io.quarkus.qute.Parser.parse(Parser.java:134)
	at io.quarkus.qute.EngineImpl.load(EngineImpl.java:138)

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@FroMage FroMage added kind/bug Something isn't working area/qute The template engine labels Dec 1, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Dec 1, 2021

/cc @mkouba

@mkouba mkouba self-assigned this Dec 7, 2021
@mkouba mkouba added this to the 2.7 - main milestone Dec 8, 2021
mkouba added a commit to mkouba/quarkus that referenced this issue Dec 8, 2021
- fix the problem with a virtual method that has a parameter with
leading/trailing spaces
- resolves quarkusio#21858
Postremus pushed a commit to Postremus/quarkus that referenced this issue Dec 10, 2021
- fix the problem with a virtual method that has a parameter with
leading/trailing spaces
- resolves quarkusio#21858
@gsmet gsmet modified the milestones: 2.7 - main, 2.6.0.Final Dec 13, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Dec 13, 2021
- fix the problem with a virtual method that has a parameter with
leading/trailing spaces
- resolves quarkusio#21858

(cherry picked from commit 7e5f3e4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/qute The template engine kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants