### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java,v retrieving revision 1.96 diff -u -r1.96 BinaryTypeBinding.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java 9 Jun 2006 10:19:06 -0000 1.96 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java 28 Jun 2006 14:10:24 -0000 @@ -315,6 +315,7 @@ boolean use15specifics = sourceLevel >= ClassFileConstants.JDK1_5; boolean isViewedAsDeprecated = isViewedAsDeprecated(); boolean hasRestrictedAccess = hasRestrictedAccess(); + int firstAnnotatedFieldIndex = -1; for (int i = 0; i < size; i++) { IBinaryField binaryField = iFields[i]; char[] fieldSignature = use15specifics ? binaryField.getGenericSignature() : null; @@ -328,8 +329,11 @@ binaryField.getModifiers() | ExtraCompilerModifiers.AccUnresolved, this, binaryField.getConstant()); - if (this.environment.globalOptions.storeAnnotations) - field.setAnnotations(createAnnotations(binaryField.getAnnotations(), this.environment)); + if (firstAnnotatedFieldIndex < 0 + && this.environment.globalOptions.storeAnnotations + && binaryField.getAnnotations() != null) { + firstAnnotatedFieldIndex = i; + } field.id = i; // ordinal if (use15specifics) field.tagBits |= binaryField.getTagBits(); @@ -341,6 +345,12 @@ field.modifiers |= ExtraCompilerModifiers.AccGenericSignature; this.fields[i] = field; } + // second pass for reifying annotations, since may refer to fields being constructed (147875) + if (firstAnnotatedFieldIndex >= 0) { + for (int i = firstAnnotatedFieldIndex; i