Lines 166-173
Link Here
|
166 |
FieldBinding existingField; |
166 |
FieldBinding existingField; |
167 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
167 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
168 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
168 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
169 |
for (int i = 0, max = typeDecl.fields.length; i < max; i++) { |
169 |
FieldDeclaration[] fieldDeclarations = typeDecl.fields; |
170 |
FieldDeclaration fieldDecl = typeDecl.fields[i]; |
170 |
for (int i = 0, max = fieldDeclarations == null ? 0 : fieldDeclarations.length; i < max; i++) { |
|
|
171 |
FieldDeclaration fieldDecl = fieldDeclarations[i]; |
171 |
if (fieldDecl.binding == existingField) { |
172 |
if (fieldDecl.binding == existingField) { |
172 |
synthField.name = CharOperation.concat( |
173 |
synthField.name = CharOperation.concat( |
173 |
TypeConstants.SYNTHETIC_OUTER_LOCAL_PREFIX, |
174 |
TypeConstants.SYNTHETIC_OUTER_LOCAL_PREFIX, |
Lines 210-217
Link Here
|
210 |
FieldBinding existingField; |
211 |
FieldBinding existingField; |
211 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
212 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
212 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
213 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
213 |
for (int i = 0, max = typeDecl.fields.length; i < max; i++) { |
214 |
FieldDeclaration[] fieldDeclarations = typeDecl.fields; |
214 |
FieldDeclaration fieldDecl = typeDecl.fields[i]; |
215 |
for (int i = 0, max = fieldDeclarations == null ? 0 : fieldDeclarations.length; i < max; i++) { |
|
|
216 |
FieldDeclaration fieldDecl = fieldDeclarations[i]; |
215 |
if (fieldDecl.binding == existingField) { |
217 |
if (fieldDecl.binding == existingField) { |
216 |
if (this.scope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_5) { |
218 |
if (this.scope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_5) { |
217 |
synthField.name = CharOperation.concat( |
219 |
synthField.name = CharOperation.concat( |
Lines 255-262
Link Here
|
255 |
FieldBinding existingField; |
257 |
FieldBinding existingField; |
256 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
258 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
257 |
TypeDeclaration typeDecl = blockScope.referenceType(); |
259 |
TypeDeclaration typeDecl = blockScope.referenceType(); |
258 |
for (int i = 0, max = typeDecl.fields.length; i < max; i++) { |
260 |
FieldDeclaration[] typeDeclarationFields = typeDecl.fields; |
259 |
FieldDeclaration fieldDecl = typeDecl.fields[i]; |
261 |
for (int i = 0, max = typeDeclarationFields == null ? 0 : typeDeclarationFields.length; i < max; i++) { |
|
|
262 |
FieldDeclaration fieldDecl = typeDeclarationFields[i]; |
260 |
if (fieldDecl.binding == existingField) { |
263 |
if (fieldDecl.binding == existingField) { |
261 |
blockScope.problemReporter().duplicateFieldInType(this, fieldDecl); |
264 |
blockScope.problemReporter().duplicateFieldInType(this, fieldDecl); |
262 |
break; |
265 |
break; |
Lines 294-300
Link Here
|
294 |
FieldBinding existingField; |
297 |
FieldBinding existingField; |
295 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
298 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
296 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
299 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
297 |
for (int i = 0, max = typeDecl.fields.length; i < max; i++) { |
300 |
for (int i = 0, max = (typeDecl.fields == null) ? 0 : typeDecl.fields.length; i < max; i++) { |
298 |
FieldDeclaration fieldDecl = typeDecl.fields[i]; |
301 |
FieldDeclaration fieldDecl = typeDecl.fields[i]; |
299 |
if (fieldDecl.binding == existingField) { |
302 |
if (fieldDecl.binding == existingField) { |
300 |
synthField.name = CharOperation.concat( |
303 |
synthField.name = CharOperation.concat( |
Lines 337-344
Link Here
|
337 |
FieldBinding existingField; |
340 |
FieldBinding existingField; |
338 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
341 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
339 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
342 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
340 |
for (int i = 0, max = typeDecl.fields.length; i < max; i++) { |
343 |
FieldDeclaration[] fieldDeclarations = typeDecl.fields; |
341 |
FieldDeclaration fieldDecl = typeDecl.fields[i]; |
344 |
for (int i = 0, max = fieldDeclarations == null ? 0 : fieldDeclarations.length; i < max; i++) { |
|
|
345 |
FieldDeclaration fieldDecl = fieldDeclarations[i]; |
342 |
if (fieldDecl.binding == existingField) { |
346 |
if (fieldDecl.binding == existingField) { |
343 |
synthField.name = CharOperation.concat( |
347 |
synthField.name = CharOperation.concat( |
344 |
TypeConstants.SYNTHETIC_ENUM_VALUES, |
348 |
TypeConstants.SYNTHETIC_ENUM_VALUES, |
Lines 425-432
Link Here
|
425 |
FieldBinding existingField; |
429 |
FieldBinding existingField; |
426 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
430 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
427 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
431 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
428 |
for (int i = 0, max = typeDecl.fields.length; i < max; i++) { |
432 |
FieldDeclaration[] fieldDeclarations = typeDecl.fields; |
429 |
FieldDeclaration fieldDecl = typeDecl.fields[i]; |
433 |
for (int i = 0, max = fieldDeclarations == null ? 0 : fieldDeclarations.length; i < max; i++) { |
|
|
434 |
FieldDeclaration fieldDecl = fieldDeclarations[i]; |
430 |
if (fieldDecl.binding == existingField) { |
435 |
if (fieldDecl.binding == existingField) { |
431 |
synthField.name = CharOperation.concat( |
436 |
synthField.name = CharOperation.concat( |
432 |
fieldName, |
437 |
fieldName, |
Lines 1256-1262
Link Here
|
1256 |
if (hasRestrictedAccess()) |
1261 |
if (hasRestrictedAccess()) |
1257 |
field.modifiers |= ExtraCompilerModifiers.AccRestrictedAccess; |
1262 |
field.modifiers |= ExtraCompilerModifiers.AccRestrictedAccess; |
1258 |
FieldDeclaration[] fieldDecls = this.scope.referenceContext.fields; |
1263 |
FieldDeclaration[] fieldDecls = this.scope.referenceContext.fields; |
1259 |
for (int f = 0, length = fieldDecls.length; f < length; f++) { |
1264 |
int length = fieldDecls == null ? 0 : fieldDecls.length; |
|
|
1265 |
for (int f = 0; f < length; f++) { |
1260 |
if (fieldDecls[f].binding != field) |
1266 |
if (fieldDecls[f].binding != field) |
1261 |
continue; |
1267 |
continue; |
1262 |
|
1268 |
|