diff options
Diffstat (limited to 'src/lombok')
-rw-r--r-- | src/lombok/javac/Javac.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lombok/javac/Javac.java b/src/lombok/javac/Javac.java index 801e7a23..90448e26 100644 --- a/src/lombok/javac/Javac.java +++ b/src/lombok/javac/Javac.java @@ -88,7 +88,11 @@ public class Javac { private static Object calculateGuess(JCExpression expr) { if ( expr instanceof JCLiteral ) { - return ((JCLiteral)expr).value; + JCLiteral lit = (JCLiteral)expr; + if ( lit.getKind() == com.sun.source.tree.Tree.Kind.BOOLEAN_LITERAL ) { + return ((Number)lit.value).intValue() == 0 ? false : true; + } + return lit.value; } else if ( expr instanceof JCIdent || expr instanceof JCFieldAccess ) { String x = expr.toString(); if ( x.endsWith(".class") ) x = x.substring(0, x.length() - 6); |