diff options
author | Tor Norbye <tnorbye@google.com> | 2014-08-21 00:31:02 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-08-16 04:55:08 +0000 |
commit | 9cde0e3c015174898df8b8f3672185941fad4786 (patch) | |
tree | 80a55c7b59c38377216daaada4e8bc47b69ceb9a /java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithTry/afterArrayInitializer.java | |
parent | 3b37877a2561bf9fbe072253a18688807d523505 (diff) | |
parent | d76e3920c56d37c942092b7dca20fcaded81c0a5 (diff) | |
download | idea-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.java | 22 |
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 |