-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Conversation
There was a problem hiding this 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(""); |
There was a problem hiding this comment.
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 !
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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...
Just noticed that after #22037 was merged