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

Fix potential NullPointerException #22075

Merged
merged 1 commit into from
Dec 10, 2021
Merged

Fix potential NullPointerException #22075

merged 1 commit into from
Dec 10, 2021

Conversation

gastaldi
Copy link
Contributor

@gastaldi gastaldi commented Dec 9, 2021

Just noticed that after #22037 was merged

@gastaldi gastaldi requested a review from mkouba December 9, 2021 16:11
@quarkus-bot quarkus-bot bot added the area/qute The template engine label Dec 9, 2021
@gastaldi gastaldi requested review from geoand and gsmet December 9, 2021 16:32
@gastaldi gastaldi added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Dec 9, 2021
gsmet
gsmet previously requested changes Dec 9, 2021
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Marking as request changes pending @mkouba's comment.

@@ -122,7 +118,7 @@ private CheckedTemplateBuildItem findCheckedTemplate(String basePath, List<Check
for (String variant : variants) {
String source = templatePaths.stream().filter(p -> p.getPath().equals(variant))
.map(TemplatePathBuildItem::getContent).findFirst()
.orElse(null);
.orElse("");
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure it's the right fix. Do we want an entry if no source? Let's ask @mkouba !

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was the previous behavior, but yeah, let's wait on @mkouba :)

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's OK, although it should never happen...

@mkouba mkouba dismissed gsmet’s stale review December 10, 2021 07:37

The solution is OK

@mkouba mkouba merged commit 8bc2149 into quarkusio:main Dec 10, 2021
@quarkus-bot quarkus-bot bot added this to the 2.7 - main milestone Dec 10, 2021
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Dec 10, 2021
@gastaldi gastaldi deleted the npe branch December 10, 2021 12:12
@gsmet gsmet modified the milestones: 2.7 - main, 2.6.0.Final Dec 13, 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.

4 participants