IDEA-112398 (Yellow code is green: Inspection "Overly broad 'catch' clause" and Runti...
[idea/community.git] / plugins / InspectionGadgets / test / com / siyeh / igtest / errorhandling / toobroadcatch / TooBroadCatchBlock.java
index 06672fac42f852268bb3215c972485dfe398bc77..c292cbcbc5bcbed049c4ced29e67404b9256d15f 100644 (file)
@@ -62,4 +62,24 @@ public class TooBroadCatchBlock{
       try (java.io.FileInputStream in = new java.io.FileInputStream("asdf")) {}
     } catch (IOException e) {}
   }
+
+  boolean m() {
+    try {
+      new java.io.FileInputStream("");
+      return new java.io.File("can_reset").isFile();
+    } catch (FileNotFoundException e) {
+      return false;
+    } catch (Exception e ) {
+      return false;
+    }
+  }
+
+  boolean m2() {
+    try {
+      new java.io.FileInputStream("");
+      return new java.io.File("can_reset").isFile();
+    } catch (Exception e ) {
+      return false;
+    }
+  }
 }