src/share/classes/com/sun/tools/javac/jvm/CRTable.java

changeset 1127
ca49d50318dc
parent 816
7c537f4298fb
child 1138
7375d4979bd3
equal deleted inserted replaced
1126:11c184155128 1127:ca49d50318dc
530 /** The end position of given tree, if it has 530 /** The end position of given tree, if it has
531 * defined endpos, NOPOS otherwise. 531 * defined endpos, NOPOS otherwise.
532 */ 532 */
533 public int endPos(JCTree tree) { 533 public int endPos(JCTree tree) {
534 if (tree == null) return Position.NOPOS; 534 if (tree == null) return Position.NOPOS;
535 if (tree.getTag() == JCTree.BLOCK) 535 if (tree.hasTag(JCTree.Tag.BLOCK))
536 return ((JCBlock) tree).endpos; 536 return ((JCBlock) tree).endpos;
537 Integer endpos = endPositions.get(tree); 537 Integer endpos = endPositions.get(tree);
538 if (endpos != null) 538 if (endpos != null)
539 return endpos.intValue(); 539 return endpos.intValue();
540 return Position.NOPOS; 540 return Position.NOPOS;

mercurial