Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 415269 | Differences between
and this patch

Collapse All | Expand All

(-)a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java (+4 lines)
Lines 21-26 Link Here
21
 *								bug 388281 - [compiler][null] inheritance of null annotations as an option
21
 *								bug 388281 - [compiler][null] inheritance of null annotations as an option
22
 *								bug 331649 - [compiler][null] consider null annotations for fields
22
 *								bug 331649 - [compiler][null] consider null annotations for fields
23
 *								bug 380896 - [compiler][null] Enum constants not recognised as being NonNull.
23
 *								bug 380896 - [compiler][null] Enum constants not recognised as being NonNull.
24
 *     Till Brychcy - Contributions for
25
 *     							bug 415269 - NonNullByDefault is not always inherited to embedded classes
24
 *******************************************************************************/
26
 *******************************************************************************/
25
package org.eclipse.jdt.internal.compiler.lookup;
27
package org.eclipse.jdt.internal.compiler.lookup;
26
28
Lines 1726-1731 Link Here
1726
1728
1727
// return: should caller continue searching?
1729
// return: should caller continue searching?
1728
protected boolean checkRedundantNullnessDefaultOne(ASTNode location, Annotation[] annotations, long annotationTagBits) {
1730
protected boolean checkRedundantNullnessDefaultOne(ASTNode location, Annotation[] annotations, long annotationTagBits) {
1731
	initializeNullDefault();
1729
	int thisDefault = this.defaultNullness;
1732
	int thisDefault = this.defaultNullness;
1730
	if (thisDefault == NONNULL_BY_DEFAULT) {
1733
	if (thisDefault == NONNULL_BY_DEFAULT) {
1731
		if ((annotationTagBits & TagBits.AnnotationNonNullByDefault) != 0) {
1734
		if ((annotationTagBits & TagBits.AnnotationNonNullByDefault) != 0) {
Lines 1756-1761 Link Here
1756
			case Scope.CLASS_SCOPE:
1759
			case Scope.CLASS_SCOPE:
1757
				currentType = ((ClassScope)currentScope).referenceContext.binding;
1760
				currentType = ((ClassScope)currentScope).referenceContext.binding;
1758
				if (currentType != null) {
1761
				if (currentType != null) {
1762
					currentType.initializeNullDefault();
1759
					int foundDefaultNullness = currentType.defaultNullness;
1763
					int foundDefaultNullness = currentType.defaultNullness;
1760
					if (foundDefaultNullness != NO_NULL_DEFAULT) {
1764
					if (foundDefaultNullness != NO_NULL_DEFAULT) {
1761
						return foundDefaultNullness == NONNULL_BY_DEFAULT;
1765
						return foundDefaultNullness == NONNULL_BY_DEFAULT;

Return to bug 415269