< prev index next >
src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeInfo.java
Print this page
rev 52490 : imported patch 8212982b2
@@ -381,10 +381,13 @@
return endPos(((JCSynchronized) tree).body);
else if (tree.hasTag(TRY)) {
JCTry t = (JCTry) tree;
return endPos((t.finalizer != null) ? t.finalizer
: (t.catchers.nonEmpty() ? t.catchers.last().body : t.body));
+ } else if (tree.hasTag(SWITCH_EXPRESSION) &&
+ ((JCSwitchExpression) tree).endpos != Position.NOPOS) {
+ return ((JCSwitchExpression) tree).endpos;
} else
return tree.pos;
}
< prev index next >