src/share/classes/com/sun/tools/javac/jvm/CRTable.java
Print this page
*** 530,540 ****
/** The end position of given tree, if it has
* defined endpos, NOPOS otherwise.
*/
public int endPos(JCTree tree) {
if (tree == null) return Position.NOPOS;
! if (tree.getTag() == JCTree.BLOCK)
return ((JCBlock) tree).endpos;
Integer endpos = endPositions.get(tree);
if (endpos != null)
return endpos.intValue();
return Position.NOPOS;
--- 530,540 ----
/** The end position of given tree, if it has
* defined endpos, NOPOS otherwise.
*/
public int endPos(JCTree tree) {
if (tree == null) return Position.NOPOS;
! if (tree.hasTag(JCTree.Tag.BLOCK))
return ((JCBlock) tree).endpos;
Integer endpos = endPositions.get(tree);
if (endpos != null)
return endpos.intValue();
return Position.NOPOS;