src/share/classes/com/sun/tools/javac/comp/Flow.java

changeset 2047
5f915a0c9615
parent 2027
4932bb04c4b8
child 2114
09a414673570
equal deleted inserted replaced
2046:1fe358ea75ff 2047:5f915a0c9615
711 } 711 }
712 712
713 ListBuffer<PendingExit> prevPending = pendingExits; 713 ListBuffer<PendingExit> prevPending = pendingExits;
714 boolean prevAlive = alive; 714 boolean prevAlive = alive;
715 try { 715 try {
716 pendingExits = ListBuffer.lb(); 716 pendingExits = new ListBuffer<>();
717 alive = true; 717 alive = true;
718 scanStat(tree.body); 718 scanStat(tree.body);
719 tree.canCompleteNormally = alive; 719 tree.canCompleteNormally = alive;
720 } 720 }
721 finally { 721 finally {
1263 } 1263 }
1264 List<Type> prevCaught = caught; 1264 List<Type> prevCaught = caught;
1265 List<Type> prevThrown = thrown; 1265 List<Type> prevThrown = thrown;
1266 ListBuffer<FlowPendingExit> prevPending = pendingExits; 1266 ListBuffer<FlowPendingExit> prevPending = pendingExits;
1267 try { 1267 try {
1268 pendingExits = ListBuffer.lb(); 1268 pendingExits = new ListBuffer<>();
1269 caught = tree.getDescriptorType(types).getThrownTypes(); 1269 caught = tree.getDescriptorType(types).getThrownTypes();
1270 thrown = List.nil(); 1270 thrown = List.nil();
1271 scan(tree.body); 1271 scan(tree.body);
1272 List<FlowPendingExit> exits = pendingExits.toList(); 1272 List<FlowPendingExit> exits = pendingExits.toList();
1273 pendingExits = new ListBuffer<FlowPendingExit>(); 1273 pendingExits = new ListBuffer<FlowPendingExit>();
1336 List<Type> prevCaught = caught; 1336 List<Type> prevCaught = caught;
1337 List<Type> prevThrown = thrown; 1337 List<Type> prevThrown = thrown;
1338 ListBuffer<FlowPendingExit> prevPending = pendingExits; 1338 ListBuffer<FlowPendingExit> prevPending = pendingExits;
1339 inLambda = true; 1339 inLambda = true;
1340 try { 1340 try {
1341 pendingExits = ListBuffer.lb(); 1341 pendingExits = new ListBuffer<>();
1342 caught = List.of(syms.throwableType); 1342 caught = List.of(syms.throwableType);
1343 thrown = List.nil(); 1343 thrown = List.nil();
1344 scan(tree.body); 1344 scan(tree.body);
1345 inferredThrownTypes = thrown; 1345 inferredThrownTypes = thrown;
1346 } finally { 1346 } finally {
2028 } 2028 }
2029 2029
2030 void reportWarning(Lint.LintCategory lc, DiagnosticPosition pos, String key, Object ... args) {} 2030 void reportWarning(Lint.LintCategory lc, DiagnosticPosition pos, String key, Object ... args) {}
2031 2031
2032 public void visitTry(JCTry tree) { 2032 public void visitTry(JCTry tree) {
2033 ListBuffer<JCVariableDecl> resourceVarDecls = ListBuffer.lb(); 2033 ListBuffer<JCVariableDecl> resourceVarDecls = new ListBuffer<>();
2034 final Bits uninitsTryPrev = new Bits(uninitsTry); 2034 final Bits uninitsTryPrev = new Bits(uninitsTry);
2035 ListBuffer<P> prevPendingExits = pendingExits; 2035 ListBuffer<P> prevPendingExits = pendingExits;
2036 pendingExits = new ListBuffer<>(); 2036 pendingExits = new ListBuffer<>();
2037 final Bits initsTry = new Bits(inits); 2037 final Bits initsTry = new Bits(inits);
2038 uninitsTry.assign(uninits); 2038 uninitsTry.assign(uninits);

mercurial