Skip to content

Commit

Permalink
[fixes projectlombok#2695] Create void literal properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawi01 committed Jan 5, 2021
1 parent 831e277 commit 9649bd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/lombok/javac/handlers/JavacSingularsRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ protected JCExpression getSize(JavacTreeMaker maker, JavacNode builderType, Name
JCExpression fn = maker.Select(maker.Select(maker.Ident(thisName), name), builderType.toName("size"));
JCExpression sizeInvoke = maker.Apply(List.<JCExpression>nil(), fn, List.<JCExpression>nil());
if (nullGuard) {
JCExpression isNull = maker.Binary(CTC_EQUAL, maker.Select(maker.Ident(thisName), name), maker.Literal(CTC_BOT, 0));
JCExpression isNull = maker.Binary(CTC_EQUAL, maker.Select(maker.Ident(thisName), name), maker.Literal(CTC_BOT, null));
JCExpression out = maker.Conditional(isNull, maker.Literal(CTC_INT, 0), sizeInvoke);
if (parens) return maker.Parens(out);
return out;
Expand Down

0 comments on commit 9649bd8

Please sign in to comment.