From ca57a44373e7997152f841e41a1ddebb10d38e0d Mon Sep 17 00:00:00 2001 From: Sasikanth Bharadwaj Date: Tue, 3 Jan 2017 11:42:45 +0530 Subject: [404146] [1.7][compiler] nested try-catch-finally-blocks leads to unrunnable Java byte code Change-Id: Iabac2ac158e2cef3a3aa5a977f113912cb479bf3 --- .../compiler/regression/BatchCompilerTest.java | 5 +- .../compiler/regression/TryStatement17Test.java | 45 ++++++- .../compiler/regression/TryStatementTest.java | 129 +++++++++++++++++++++ .../core/tests/compiler/regression/XLargeTest.java | 8 +- .../jdt/internal/compiler/ast/TryStatement.java | 6 +- .../internal/compiler/impl/CompilerOptions.java | 19 ++- .../internal/formatter/DefaultCodeFormatter.java | 5 +- 7 files changed, 210 insertions(+), 7 deletions(-) diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java index eb6e3f7e77..c496695fb5 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,6 +11,8 @@ * Stephan Herrmann - Contribution for bug 236385 * Stephan Herrmann - Contribution for bug 295551 * Stephan Herrmann - Contribution for bug 185682 - Increment/decrement operators mark local variables as read + * Jesper Steen Moller - Contributions for + * bug 404146 - [1.7][compiler] nested try-catch-finally-blocks leads to unrunnable Java byte code *******************************************************************************/ package org.eclipse.jdt.core.tests.compiler.regression; @@ -1795,6 +1797,7 @@ public void test012b(){ " \n" + " \n" + "