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 parameter declarations - autoimport java.lang if needed #21007

Merged
merged 1 commit into from
Oct 27, 2021

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Oct 26, 2021

@mkouba mkouba requested a review from maxandersen October 26, 2021 10:10
@quarkus-bot quarkus-bot bot added the area/qute The template engine label Oct 26, 2021
@mkouba mkouba added this to the 2.5 - main milestone Oct 26, 2021
@mkouba mkouba requested a review from gastaldi October 27, 2021 08:07
if (!rawClassName.toString().contains(".")) {
// Try the java.lang prefix for a name without package
rawClassName = DotName.createSimple(Types.JAVA_LANG_PREFIX + rawClassName.toString());
clazz = index.getClassByName(rawClassName);
Copy link
Contributor

Choose a reason for hiding this comment

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

Didn't know that java.lang classes were jandexed too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They're not ;-). But we try to index unknown classes on demand. At least in the bean archive index. For the combined index you would need to use CombinedIndexBuildItem.getComputingIndex() instead.

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 merged commit 433d2d5 into quarkusio:main Oct 27, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Qute parameter declarations - allow referring to java.lang.String as just String
2 participants