--- old/src/share/classes/com/sun/tools/javac/code/Attribute.java 2014-05-09 16:27:50.672149826 -0400 +++ new/src/share/classes/com/sun/tools/javac/code/Attribute.java 2014-05-09 16:27:50.574145667 -0400 @@ -142,7 +142,7 @@ * access this attribute. */ public final List> values; - public TypeAnnotationPosition position; + public final TypeAnnotationPosition position; private boolean synthesized = false; @@ -170,53 +170,9 @@ @Override public TypeAnnotationPosition getPosition() { - if (hasUnknownPosition()) { - if (values.size() != 0) { - Name valueName = values.head.fst.name.table.names.value; - Pair res = getElemPair(valueName); - position = res == null ? null : res.snd.getPosition(); - } - } return position; } - public boolean isContainerTypeCompound() { - if (isSynthesized() && values.size() == 1) - return getFirstEmbeddedTC() != null; - return false; - } - - private Compound getFirstEmbeddedTC() { - if (values.size() == 1) { - Pair val = values.get(0); - if (val.fst.getSimpleName().contentEquals("value") - && val.snd instanceof Array) { - Array arr = (Array) val.snd; - if (arr.values.length != 0 - && arr.values[0] instanceof Attribute.TypeCompound) - return (Attribute.TypeCompound) arr.values[0]; - } - } - return null; - } - - public boolean tryFixPosition() { - if (!isContainerTypeCompound()) - return false; - - Compound from = getFirstEmbeddedTC(); - if (from != null && from.position != null && - from.position.type != TargetType.UNKNOWN) { - position = from.position; - return true; - } - return false; - } - - public boolean hasUnknownPosition() { - return position.type == TargetType.UNKNOWN; - } - public void accept(Visitor v) { v.visitCompound(this); } /**