Skip to content

Commit

Permalink
Properly warn about missing javac -parameters flag
Browse files Browse the repository at this point in the history
Closes: #1108
  • Loading branch information
geoand committed Nov 26, 2024
1 parent 6b6ed17 commit 123a182
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1362,16 +1362,16 @@ private List<TemplateParameterInfo> gatherTemplateParamInfo(List<MethodParameter
}
}

if ((templateParams.size() == 1) && (params.size() == 1)) {
// the special 'it' param is supported when the method only has one parameter
templateParams.add(new TemplateParameterInfo(0, "it"));
}

if (!templateParams.isEmpty() && templateParams.stream().map(TemplateParameterInfo::name).allMatch(Objects::isNull)) {
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.");
}

if ((templateParams.size() == 1) && (params.size() == 1)) {
// the special 'it' param is supported when the method only has one parameter
templateParams.add(new TemplateParameterInfo(0, "it"));
}

return templateParams;
}

Expand Down

0 comments on commit 123a182

Please sign in to comment.