diff options
author | Rawi01 <Rawi01@users.noreply.github.com> | 2021-01-05 18:32:43 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2021-01-14 23:37:54 +0100 |
commit | b8d49a884ed545176bb491b10b59dde9f481ea95 (patch) | |
tree | 9c2f9feb778eb32bf69ac2178685172bde352987 /src | |
parent | 831e277d0084ee0c37881344e826e0ba3f54c5af (diff) | |
download | lombok-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.java | 2 |
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; |