diff options
author | Stephan Herrmann | 2013-08-19 16:42:46 +0000 |
---|---|---|
committer | Stephan Herrmann | 2013-08-20 12:13:35 +0000 |
commit | dc2b9befa6829d8676bcaaed036d87dc45fd9d36 (patch) | |
tree | 3d51eb3c48b333c8681036ae31d2b6cabfe59d52 | |
parent | f6f7d388aa0c7d38932b2bf8e8acc1d08cf2759a (diff) | |
download | eclipse.jdt.core-dc2b9befa6829d8676bcaaed036d87dc45fd9d36.tar.gz eclipse.jdt.core-dc2b9befa6829d8676bcaaed036d87dc45fd9d36.tar.xz eclipse.jdt.core-dc2b9befa6829d8676bcaaed036d87dc45fd9d36.zip |
Bug 415043 - [1.8][null] Follow-up re null type annotations after bug
392099
- (7) tidy: include ArrayBinding in this treatment
-rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java index 05d8039d21..ba575499de 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java @@ -27,6 +27,7 @@ * bug 380896 - [compiler][null] Enum constants not recognised as being NonNull. * bug 391376 - [1.8] check interaction of default methods with bridge methods and generics * Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis + * Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099 *******************************************************************************/ package org.eclipse.jdt.internal.compiler.lookup; @@ -1536,9 +1537,9 @@ public FieldBinding resolveTypeFor(FieldBinding field) { // validate null annotation: this.scope.validateNullAnnotation(field.tagBits, fieldDecl.type, fieldDecl.annotations); } - if (sourceLevel >= ClassFileConstants.JDK1_8 && field.type instanceof ReferenceBinding) { + if (sourceLevel >= ClassFileConstants.JDK1_8 && !fieldType.isBaseType()) { long nullTagBits = field.tagBits & TagBits.AnnotationNullMASK; - if (nullTagBits != 0 && nullTagBits != (field.type.tagBits & TagBits.AnnotationNullMASK)) + if (nullTagBits != 0 && nullTagBits != (fieldType.tagBits & TagBits.AnnotationNullMASK)) field.type = environment.pushAnnotationIntoType(fieldType, fieldDecl.type, nullTagBits); // do not reset field.tagBits, since more fields may need to share this information ("@NonNull Object o1, o2;") } |