mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-12 20:15:55 +00:00
[fixes #2695] Create void literal properly
This commit is contained in:
1 parent
831e277d00
commit
b8d49a884e
1 file changed
+1
-1
@@ -471,7 +471,7 @@ public class JavacSingularsRecipes {
|
||||
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;
|
||||
|
||||
Reference in new issue
Block a user