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 Type-safe Templates - fix template path validation #15412

Merged
merged 1 commit into from
Mar 4, 2021

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Mar 2, 2021

@quarkus-bot quarkus-bot bot added the area/qute The template engine label Mar 2, 2021
@mkouba mkouba requested a review from gastaldi March 2, 2021 15:24
Copy link
Contributor

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mkouba mkouba added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Mar 2, 2021
@gsmet
Copy link
Member

gsmet commented Mar 2, 2021

CI failed with:

2021-03-02T19:22:51.8960176Z [ERROR] io.quarkus.resteasy.reactive.qute.deployment.MissingTemplateTest  Time elapsed: 0.807 s  <<< FAILURE!
2021-03-02T19:22:51.8962316Z java.lang.AssertionError: COM01003: Internal error: Assertion failure: Expected boolean value to be false
2021-03-02T19:22:51.8963621Z 	at org.wildfly.common.Assert.assertTrue(Assert.java:520)
2021-03-02T19:22:51.8966057Z 	at io.quarkus.resteasy.reactive.qute.deployment.MissingTemplateTest.lambda$static$1(MissingTemplateTest.java:20)
2021-03-02T19:22:51.8968705Z 	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:490)
2021-03-02T19:22:51.8971857Z 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)
2021-03-02T19:22:51.8975676Z 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
2021-03-02T19:22:51.9032805Z 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:368)
2021-03-02T19:22:51.9037146Z 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:192)
2021-03-02T19:22:51.9040649Z 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:78)
2021-03-02T19:22:51.9044035Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:136)
2021-03-02T19:22:51.9047504Z 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)

@gsmet
Copy link
Member

gsmet commented Mar 2, 2021

Btw, we shouldn't use org.wildfly.common.Assert.

@mkouba
Copy link
Contributor Author

mkouba commented Mar 3, 2021

Btw, we shouldn't use org.wildfly.common.Assert.

Sure thing. I'm not the original author of the test though ;-).

The test should be fixed now.

- also add more meaningful error message if a template matches the path
but the file suffix is not configured via quarkus.qute.suffixes
- resolves quarkusio#12355
@quarkus-bot quarkus-bot bot added the area/rest label Mar 3, 2021
@mkouba mkouba merged commit 77b9293 into quarkusio:master Mar 4, 2021
@quarkus-bot quarkus-bot bot added this to the 1.13 - master milestone Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/qute The template engine area/rest triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NullPointerException when rendering Qute templates as XML
3 participants