src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java

changeset 2149
e5d3cd43c85e
parent 2136
7f6481e5fe3a
child 2150
ae4f5cb78ebd
equal deleted inserted replaced
2148:c4292590fc70 2149:e5d3cd43c85e
402 402
403 ListBuffer<TypePathEntry> depth = new ListBuffer<>(); 403 ListBuffer<TypePathEntry> depth = new ListBuffer<>();
404 depth = depth.append(TypePathEntry.ARRAY); 404 depth = depth.append(TypePathEntry.ARRAY);
405 while (arType.elemtype.hasTag(TypeTag.ARRAY)) { 405 while (arType.elemtype.hasTag(TypeTag.ARRAY)) {
406 if (arType.elemtype.isAnnotated()) { 406 if (arType.elemtype.isAnnotated()) {
407 Type.AnnotatedType aelemtype = (Type.AnnotatedType) arType.elemtype; 407 Type aelemtype = arType.elemtype;
408 arType = (Type.ArrayType) aelemtype.unannotatedType(); 408 arType = (Type.ArrayType) aelemtype.unannotatedType();
409 ArrayType prevToMod = tomodify; 409 ArrayType prevToMod = tomodify;
410 tomodify = new Type.ArrayType(null, arType.tsym); 410 tomodify = new Type.ArrayType(null, arType.tsym);
411 prevToMod.elemtype = (Type.AnnotatedType) tomodify.annotatedType(arType.elemtype.getAnnotationMirrors()); 411 prevToMod.elemtype = tomodify.annotatedType(arType.elemtype.getAnnotationMirrors());
412 } else { 412 } else {
413 arType = (Type.ArrayType) arType.elemtype; 413 arType = (Type.ArrayType) arType.elemtype;
414 tomodify.elemtype = new Type.ArrayType(null, arType.tsym); 414 tomodify.elemtype = new Type.ArrayType(null, arType.tsym);
415 tomodify = (Type.ArrayType) tomodify.elemtype; 415 tomodify = (Type.ArrayType) tomodify.elemtype;
416 } 416 }

mercurial