summaryrefslogtreecommitdiff
path: root/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithTry/beforeMethodRef.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithTry/beforeMethodRef.java')
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithTry/beforeMethodRef.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithTry/beforeMethodRef.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithTry/beforeMethodRef.java
new file mode 100644
index 000000000000..80cc540bed71
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithTry/beforeMethodRef.java
@@ -0,0 +1,20 @@
+// "Surround with try/catch" "false"
+public class ExTest {
+ public static void maybeThrow(String data) throws Ex {
+ throw new Ex(data);
+ }
+
+ {
+ Block<String> b = ExTest::may<caret>beThrow(t);
+ }
+
+
+ private static class Ex extends Throwable {
+ public Ex(String s) {
+ }
+ }
+}
+
+interface Block<T> {
+ public void accept(T t);
+} \ No newline at end of file