Skip to content

Commit

Permalink
Fix spotbugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadow-Devil committed Oct 3, 2024
1 parent f6f222a commit 0e1ae32
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ private SyntaxTree generateSyntaxTree() throws BindgenException {
}

private SyntaxTree generateFromTemplate(Path filePath) throws BindgenException {
return generateFromTemplate(filePath, env.getAlias(currentClass.getName()));
String alias = env.getAlias(currentClass.getName());
if (alias == null) {
throw new BindgenException("error: unable to generate the binding class '" + currentClass.getName() + "'");
}
return generateFromTemplate(filePath, alias);
}

private SyntaxTree generateFromTemplate(Path filePath, String alias) throws BindgenException {
Expand Down

0 comments on commit 0e1ae32

Please sign in to comment.