diff options
author | Tor Norbye <tnorbye@google.com> | 2013-08-21 17:06:11 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2013-08-21 17:06:22 -0700 |
commit | ce0245dfc4d045479a910a98a0f8655e1ed1419a (patch) | |
tree | 438440769eaa8f0073f80d90fb47467a9abe03ce /plugins/InspectionGadgets/test | |
parent | d34b4c8d74407f5b2be1a344e41f2ecdeb25f4fe (diff) | |
download | idea-ce0245dfc4d045479a910a98a0f8655e1ed1419a.tar.gz |
Snapshot 5755a4daa62e3fe56827696be38afb29f7fa297b from master branch of git://git.jetbrains.org/idea/community.git
5755a4d: 2013-08-21 Bas Leijdekkers - IDEA-112398 (Yellow code is green: Inspection "Overly broad 'catch' clause" and RuntimeException)
21e3c90: 2013-08-21 Gregory.Shrago - EditorImpl-based table cell renderer
8f24e2f: 2013-08-21 Maxim.Mossienko - fix performance regression
0ea191f: 2013-08-21 peter - IDEA-112373 Rectangular selection paste bug
e10ed95: 2013-08-21 peter - IDEA-112377 Caret moving problem inside "Find" input
e21aa9a: 2013-08-21 peter - allow stubs built from ast be gc'ed
78ecf28: 2013-08-21 peter - IDEA-112358 'Constant Conditions' does not understand non-short-circuit 'or'
dbb57c5: 2013-08-21 Roman Shevchenko - Xinerama suppression reverted
b81debe: 2013-08-21 Anna Kozlova - NPE
c94daa8: 2013-08-21 Anna Kozlova - build graph: cleanup done amount if exception is thrown and logged (IDEA-112290)
ac9c969: 2013-08-21 Anna Kozlova - definitions search: allow to provide additional information through search parameters: speed up Ctrl-Shift-I by reduction by type hierarchy (IDEA-109493)
2e10748: 2013-08-21 Maxim.Mossienko - less logging / better comment
6e64688: 2013-08-21 Maxim.Mossienko - NPE
3cd7a98: 2013-08-21 Nadya Zabrodina - Common updateContent method for Merge and UpdateTo dialog moved to HgUiUtil
2bb8b9c: 2013-08-21 Maxim.Mossienko - proper logging
83d01c8: 2013-08-21 Konstantin Bulenkov - fix coverage colors under Darcula
Change-Id: I06739ac3637c5ae6459132cc040c874e11244af6
Diffstat (limited to 'plugins/InspectionGadgets/test')
2 files changed, 34 insertions, 0 deletions
diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/toobroadcatch/TooBroadCatchBlock.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/toobroadcatch/TooBroadCatchBlock.java index 06672fac42f8..c292cbcbc5bc 100644 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/toobroadcatch/TooBroadCatchBlock.java +++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/toobroadcatch/TooBroadCatchBlock.java @@ -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; + } + } } diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/toobroadcatch/expected.xml b/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/toobroadcatch/expected.xml index 55b5b0ed11ce..6c49ec83fc88 100644 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/toobroadcatch/expected.xml +++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/toobroadcatch/expected.xml @@ -35,4 +35,18 @@ <problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Overly broad 'catch' block</problem_class> <description>'catch' of <code>IOException</code> is too broad, masking exception 'FileNotFoundException' #loc</description> </problem> + + <problem> + <file>TooBroadCatchBlock.java</file> + <line>72</line> + <problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Overly broad 'catch' block</problem_class> + <description>'catch' of <code>Exception</code> is too broad, masking exception 'RuntimeException' #loc</description> + </problem> + + <problem> + <file>TooBroadCatchBlock.java</file> + <line>81</line> + <problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Overly broad 'catch' block</problem_class> + <description>'catch' of <code>Exception</code> is too broad, masking exception 'FileNotFoundException' #loc</description> + </problem> </problems>
\ No newline at end of file |