aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRawi01 <Rawi01@users.noreply.github.com>2021-01-05 18:32:43 +0100
committerRoel Spilker <r.spilker@gmail.com>2021-01-14 23:37:54 +0100
commitb8d49a884ed545176bb491b10b59dde9f481ea95 (patch)
tree9c2f9feb778eb32bf69ac2178685172bde352987 /src
parent831e277d0084ee0c37881344e826e0ba3f54c5af (diff)
downloadlombok-b8d49a884ed545176bb491b10b59dde9f481ea95.tar.gz
lombok-b8d49a884ed545176bb491b10b59dde9f481ea95.tar.bz2
lombok-b8d49a884ed545176bb491b10b59dde9f481ea95.zip
[fixes #2695] Create void literal properly
Diffstat (limited to 'src')
-rw-r--r--src/core/lombok/javac/handlers/JavacSingularsRecipes.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java
index 2fc9329c..35a4dbb0 100644
--- a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java
+++ b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java
@@ -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;