diff options
| author | Samrat Dhillon | 2013-10-17 12:15:20 +0000 |
|---|---|---|
| committer | Manju Mathew | 2013-10-17 12:15:20 +0000 |
| commit | 40af1211b9a2b7e7e9a8c6da73ab7be6b24f07a3 (patch) | |
| tree | 809d1aa3e92040ba3829e3c272d5fd4bc10046f7 | |
| parent | 794af31895de019e6dee502e0d1f0ba337c03cdd (diff) | |
| download | eclipse.jdt.ui-40af1211b9a2b7e7e9a8c6da73ab7be6b24f07a3.tar.gz eclipse.jdt.ui-40af1211b9a2b7e7e9a8c6da73ab7be6b24f07a3.tar.xz eclipse.jdt.ui-40af1211b9a2b7e7e9a8c6da73ab7be6b24f07a3.zip | |
Fixed Bug 388724: [surround with try/catch][quick fix] Multi-CatchI20131022-1300I20131022-0800
QuickFix creates compiler error. Added testcases.
Signed-off-by: Samrat Dhillon <samrat.dhillon@gmail.com>
3 files changed, 37 insertions, 1 deletions
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/SurroundWithWorkSpace/SurroundWithTests/trycatch17_in/TestMultiTryCatch.java b/org.eclipse.jdt.ui.tests.refactoring/resources/SurroundWithWorkSpace/SurroundWithTests/trycatch17_in/TestMultiTryCatch.java new file mode 100644 index 0000000000..86c41a32a5 --- /dev/null +++ b/org.eclipse.jdt.ui.tests.refactoring/resources/SurroundWithWorkSpace/SurroundWithTests/trycatch17_in/TestMultiTryCatch.java @@ -0,0 +1,14 @@ +package trycatch17_in; +import java.io.IOException; +import java.net.MalformedURLException; + +public class TestMultiTryCatch { + private static void call() throws Exception, IOException, MalformedURLException { + + } + + public static void main(String[] args) { + /*[*/call();/*]*/ + } + +}
\ No newline at end of file diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/SurroundWithWorkSpace/SurroundWithTests/trycatch17_out/TestMultiTryCatch.java b/org.eclipse.jdt.ui.tests.refactoring/resources/SurroundWithWorkSpace/SurroundWithTests/trycatch17_out/TestMultiTryCatch.java new file mode 100644 index 0000000000..54f4e0e909 --- /dev/null +++ b/org.eclipse.jdt.ui.tests.refactoring/resources/SurroundWithWorkSpace/SurroundWithTests/trycatch17_out/TestMultiTryCatch.java @@ -0,0 +1,17 @@ +package trycatch17_out; +import java.io.IOException; +import java.net.MalformedURLException; + +public class TestMultiTryCatch { + private static void call() throws Exception, IOException, MalformedURLException { + + } + + public static void main(String[] args) { + try { + /*[*/call();/*]*/ + } catch (Exception e) { + } + } + +}
\ No newline at end of file diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/SurroundWithTests17.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/SurroundWithTests17.java index 5ec9ec090e..78b7d98087 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/SurroundWithTests17.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/SurroundWithTests17.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 IBM Corporation and others. + * Copyright (c) 2011, 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 @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Samrat Dhillon <samrat.dhillon@gmail.com> - Bug 388724 - [surround with try/catch][quick fix] Multi-Catch QuickFix creates compiler error *******************************************************************************/ package org.eclipse.jdt.ui.tests.refactoring; @@ -59,5 +60,9 @@ public class SurroundWithTests17 extends SurroundWithTests { public void testSimple2() throws Exception { tryCatchTest(); } + + public void testMultiTryCatch() throws Exception { + tryCatchTest(); + } }
\ No newline at end of file |
