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

Prevent false positive of javac -parameters #718

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ private List<TemplateParameterInfo> gatherTemplateParamInfo(List<MethodParameter
templateParams.add(new TemplateParameterInfo(0, "it"));
}

if (templateParams.stream().map(TemplateParameterInfo::name).allMatch(Objects::isNull)) {
if (!templateParams.isEmpty() && templateParams.stream().map(TemplateParameterInfo::name).allMatch(Objects::isNull)) {
Copy link
Collaborator Author

@geoand geoand Jul 4, 2024

Choose a reason for hiding this comment

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

The Javadoc of allMatch says it returns true when the stream is empty. I never knew that and I find it odd, but 🤷🏼‍♂️

log.warn(
"The application has been compiled without the '-parameters' being set flag on javac. Make sure your build tool is configured to pass this flag to javac, otherwise Quarkus LangChain4j is unlikely to work properly without it.");
}
Expand Down
Loading