diff options
author | Rawi01 <Rawi01@users.noreply.github.com> | 2020-08-31 09:57:29 +0200 |
---|---|---|
committer | Rawi01 <Rawi01@users.noreply.github.com> | 2020-08-31 09:57:29 +0200 |
commit | 82ac8aad1d0e3e152db4ce328184c40c73700cee (patch) | |
tree | 3d5abb9072d43b87f19e5faf88a3d09b6c6da8e4 /src/core/lombok/eclipse/handlers/HandleNonNull.java | |
parent | 3d90a51163354930eeea0e26c2b0a567af8e96be (diff) | |
parent | 9148294f78a8e646ee131ca182a9b692bc028fdb (diff) | |
download | lombok-82ac8aad1d0e3e152db4ce328184c40c73700cee.tar.gz lombok-82ac8aad1d0e3e152db4ce328184c40c73700cee.tar.bz2 lombok-82ac8aad1d0e3e152db4ce328184c40c73700cee.zip |
Merge branch 'master' into extensionmethod
Conflicts:
build.xml
Diffstat (limited to 'src/core/lombok/eclipse/handlers/HandleNonNull.java')
-rw-r--r-- | src/core/lombok/eclipse/handlers/HandleNonNull.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleNonNull.java b/src/core/lombok/eclipse/handlers/HandleNonNull.java index c4d42c2e..903d098b 100644 --- a/src/core/lombok/eclipse/handlers/HandleNonNull.java +++ b/src/core/lombok/eclipse/handlers/HandleNonNull.java @@ -40,7 +40,6 @@ import org.eclipse.jdt.internal.compiler.ast.Expression; import org.eclipse.jdt.internal.compiler.ast.IfStatement; import org.eclipse.jdt.internal.compiler.ast.MessageSend; import org.eclipse.jdt.internal.compiler.ast.NullLiteral; -import org.eclipse.jdt.internal.compiler.ast.OperatorIds; import org.eclipse.jdt.internal.compiler.ast.SingleNameReference; import org.eclipse.jdt.internal.compiler.ast.Statement; import org.eclipse.jdt.internal.compiler.ast.SynchronizedStatement; @@ -232,11 +231,11 @@ public class HandleNonNull extends EclipseAnnotationHandler<NonNull> { Expression cond = isIf ? ((IfStatement) stat).condition : ((AssertStatement) stat).assertExpression; if (!(cond instanceof EqualExpression)) return null; EqualExpression bin = (EqualExpression) cond; - int operatorId = ((bin.bits & ASTNode.OperatorMASK) >> ASTNode.OperatorSHIFT); + String op = bin.operatorToString(); if (isIf) { - if (operatorId != OperatorIds.EQUAL_EQUAL) return null; + if (!"==".equals(op)) return null; } else { - if (operatorId != OperatorIds.NOT_EQUAL) return null; + if (!"!=".equals(op)) return null; } if (!(bin.left instanceof SingleNameReference)) return null; if (!(bin.right instanceof NullLiteral)) return null; |