summaryrefslogtreecommitdiff
path: root/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithTry/afterArrayInitializer.java
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-08-21 00:31:02 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-08-16 04:55:08 +0000
commit9cde0e3c015174898df8b8f3672185941fad4786 (patch)
tree80a55c7b59c38377216daaada4e8bc47b69ceb9a /java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithTry/afterArrayInitializer.java
parent3b37877a2561bf9fbe072253a18688807d523505 (diff)
parentd76e3920c56d37c942092b7dca20fcaded81c0a5 (diff)
downloadidea-9cde0e3c015174898df8b8f3672185941fad4786.tar.gz
Merge "Merge remote-tracking branch 'aosp/upstream-master' into merge"
Diffstat (limited to 'java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithTry/afterArrayInitializer.java')
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithTry/afterArrayInitializer.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithTry/afterArrayInitializer.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithTry/afterArrayInitializer.java
new file mode 100644
index 000000000000..fda3c915e4da
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithTry/afterArrayInitializer.java
@@ -0,0 +1,22 @@
+// "Surround with try/catch" "true"
+public class ExTest {
+ public static String maybeThrow(String data) throws Ex {
+ throw new Ex(data);
+ }
+
+ {
+ String[] a = new String[0];
+ try {
+ a = new String[]{maybeThrow("")};
+ } catch (Ex ex) {
+ ex.printStackTrace();
+ }
+ System.out.println(a);
+ }
+
+
+ private static class Ex extends Exception {
+ public Ex(String s) {
+ }
+ }
+} \ No newline at end of file