View | Details | Raw Unified | Return to bug 251539 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java (-2 / +6 lines)
Lines 1016-1022 Link Here
1016
				}
1016
				}
1017
			} while ((current = current.enclosingType()) != null);
1017
			} while ((current = current.enclosingType()) != null);
1018
		}
1018
		}
1019
		this.maxFieldCount = 0;
1019
		// this.maxFieldCount might already be set
1020
		int localMaxFieldCount = 0;
1020
		int lastVisibleFieldID = -1;
1021
		int lastVisibleFieldID = -1;
1021
		boolean hasEnumConstants = false;
1022
		boolean hasEnumConstants = false;
1022
		FieldDeclaration[] enumConstantsWithoutBody = null;
1023
		FieldDeclaration[] enumConstantsWithoutBody = null;
Lines 1057-1063 Link Here
1057
								&& TypeBinding.LONG == fieldBinding.type) {
1058
								&& TypeBinding.LONG == fieldBinding.type) {
1058
							needSerialVersion = false;
1059
							needSerialVersion = false;
1059
						}
1060
						}
1060
						this.maxFieldCount++;
1061
						localMaxFieldCount++;
1061
						lastVisibleFieldID = field.binding.id;
1062
						lastVisibleFieldID = field.binding.id;
1062
						break;
1063
						break;
1063
1064
Lines 1068-1073 Link Here
1068
				field.resolve(field.isStatic() ? this.staticInitializerScope : this.initializerScope);
1069
				field.resolve(field.isStatic() ? this.staticInitializerScope : this.initializerScope);
1069
			}
1070
			}
1070
		}
1071
		}
1072
		if (this.maxFieldCount < localMaxFieldCount) {
1073
			this.maxFieldCount = localMaxFieldCount;
1074
		}
1071
		if (needSerialVersion) {
1075
		if (needSerialVersion) {
1072
			this.scope.problemReporter().missingSerialVersion(this);
1076
			this.scope.problemReporter().missingSerialVersion(this);
1073
		}
1077
		}
(-)eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java (-6 / +1 lines)
Lines 127-138 Link Here
127
	}
127
	}
128
	// retrieve the enclosing one guaranteed to be the one matching the propagated flow info
128
	// retrieve the enclosing one guaranteed to be the one matching the propagated flow info
129
	// 1FF9ZBU: LFCOM:ALL - Local variable attributes busted (Sanity check)
129
	// 1FF9ZBU: LFCOM:ALL - Local variable attributes busted (Sanity check)
130
	if (this.enclosingClassFile == null) {
130
	this.codeStream.maxFieldCount = aType.scope.outerMostClassScope().referenceType().maxFieldCount;
131
		this.codeStream.maxFieldCount = aType.scope.referenceType().maxFieldCount;
132
	} else {
133
		ClassFile outermostClassFile = outerMostEnclosingClassFile();
134
		this.codeStream.maxFieldCount = outermostClassFile.codeStream.maxFieldCount;
135
	}
136
}
131
}
137
/**
132
/**
138
 * INTERNAL USE-ONLY
133
 * INTERNAL USE-ONLY
(-)compiler/org/eclipse/jdt/internal/compiler/ClassFile.java (-6 / +1 lines)
Lines 6915-6926 Link Here
6915
6915
6916
		// retrieve the enclosing one guaranteed to be the one matching the propagated flow info
6916
		// retrieve the enclosing one guaranteed to be the one matching the propagated flow info
6917
		// 1FF9ZBU: LFCOM:ALL - Local variable attributes busted (Sanity check)
6917
		// 1FF9ZBU: LFCOM:ALL - Local variable attributes busted (Sanity check)
6918
		if (this.enclosingClassFile == null) {
6918
		this.codeStream.maxFieldCount = aType.scope.outerMostClassScope().referenceType().maxFieldCount;
6919
			this.codeStream.maxFieldCount = aType.scope.referenceType().maxFieldCount;
6920
		} else {
6921
			ClassFile outermostClassFile = outerMostEnclosingClassFile();
6922
			this.codeStream.maxFieldCount = outermostClassFile.codeStream.maxFieldCount;
6923
		}
6924
	}
6919
	}
6925
6920
6926
	private void initializeDefaultLocals(StackMapFrame frame,
6921
	private void initializeDefaultLocals(StackMapFrame frame,

Return to bug 251539