Source:
<code>protected void checkAndSetModifiersForField(FieldBinding fieldBinding, FieldDeclaration fieldDecl) { int modifiers = fieldBinding.modifiers; final ReferenceBinding declaringClass = fieldBinding.declaringClass; if ((modifiers & ExtraCompilerModifiers.AccAlternateModifierProblem) != 0) { problemReporter().duplicateModifierForField(declaringClass, fieldDecl); <START> } <END> if (isTrait()) { final int unexpectedModifiers = ~(ClassFileConstants.AccPublic | ClassFileConstants.AccPrivate | ClassFileConstants.AccFinal | ClassFileConstants.AccStatic | ClassFileConstants.AccTransient | ClassFileConstants.AccVolatile); int realModifiers = modifiers & ExtraCompilerModifiers.AccJustFlag; if ((realModifiers & unexpectedModifiers) != 0) { problemReporter().illegalModifierForField(declaringClass, fieldDecl); modifiers &= ~ExtraCompilerModifiers.AccJustFlag | ~unexpectedModifiers; } int accessorBits = realModifiers & (ClassFileConstants.AccPublic | ClassFileConstants.AccPrivate); if ((accessorBits & (accessorBits - 1)) > 1) { problemReporter().illegalVisibilityModifierCombinationForField(declaringClass, fieldDecl); if ((accessorBits & ClassFileConstants.AccPublic) != 0) { if ((accessorBits & ClassFileConstants.AccPrivate) != 0) { modifiers &= ~ClassFileConstants.AccPrivate; } } else if ((accessorBits & ClassFileConstants.AccProtected) != 0 && (accessorBits & ClassFileConstants.AccPrivate) != 0) { modifiers &= ~ClassFileConstants.AccPrivate; } } if ((realModifiers & (ClassFileConstants.AccFinal | ClassFileConstants.AccVolatile)) == (ClassFileConstants.AccFinal | ClassFileConstants.AccVolatile)) { problemReporter().illegalModifierCombinationFinalVolatileForField(declaringClass, fieldDecl); } if (fieldDecl.initialization == null && (modifiers & ClassFileConstants.AccFinal) != 0) { modifiers |= ExtraCompilerModifiers.AccBlankFinal; } fieldBinding.modifiers = modifiers; } else { super.checkAndSetModifiersForField(fieldBinding, fieldDecl); } }</code><technical_language>surprised this extra check if (isTrait()) {...} else { super.blah(..)}. suspicious need it? build field declaration incorrectly in GCUD</technical_language>

Target:
protected void checkAndSetModifiersForField(FieldBinding fieldBinding, FieldDeclaration fieldDecl) { if (isTrait()) { int modifiers = fieldBinding.modifiers; final ReferenceBinding declaringClass = fieldBinding.declaringClass; if ((modifiers & ExtraCompilerModifiers.AccAlternateModifierProblem) != 0) { problemReporter().duplicateModifierForField(declaringClass, fieldDecl); } final int unexpectedModifiers = ~(ClassFileConstants.AccPublic | ClassFileConstants.AccPrivate | ClassFileConstants.AccFinal | ClassFileConstants.AccStatic | ClassFileConstants.AccTransient | ClassFileConstants.AccVolatile); int realModifiers = modifiers & ExtraCompilerModifiers.AccJustFlag; if ((realModifiers & unexpectedModifiers) != 0) { problemReporter().illegalModifierForField(declaringClass, fieldDecl); modifiers &= ~ExtraCompilerModifiers.AccJustFlag | ~unexpectedModifiers; } int accessorBits = realModifiers & (ClassFileConstants.AccPublic | ClassFileConstants.AccPrivate); if ((accessorBits & (accessorBits - 1)) > 1) { problemReporter().illegalVisibilityModifierCombinationForField(declaringClass, fieldDecl); if ((accessorBits & ClassFileConstants.AccPublic) != 0) { if ((accessorBits & ClassFileConstants.AccPrivate) != 0) { modifiers &= ~ClassFileConstants.AccPrivate; } } else if ((accessorBits & ClassFileConstants.AccProtected) != 0 && (accessorBits & ClassFileConstants.AccPrivate) != 0) { modifiers &= ~ClassFileConstants.AccPrivate; } } if ((realModifiers & (ClassFileConstants.AccFinal | ClassFileConstants.AccVolatile)) == (ClassFileConstants.AccFinal | ClassFileConstants.AccVolatile)) { problemReporter().illegalModifierCombinationFinalVolatileForField(declaringClass, fieldDecl); } if (fieldDecl.initialization == null && (modifiers & ClassFileConstants.AccFinal) != 0) { modifiers |= ExtraCompilerModifiers.AccBlankFinal; } fieldBinding.modifiers = modifiers; } else { super.checkAndSetModifiersForField(fieldBinding, fieldDecl); } }