diff options
Diffstat (limited to 'plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/try_identical_catches/TryIdenticalCatches.after.java')
-rw-r--r-- | plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/try_identical_catches/TryIdenticalCatches.after.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/try_identical_catches/TryIdenticalCatches.after.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/try_identical_catches/TryIdenticalCatches.after.java index 032fa0002dea..a161e388ce3b 100644 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/try_identical_catches/TryIdenticalCatches.after.java +++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/try_identical_catches/TryIdenticalCatches.after.java @@ -117,4 +117,18 @@ class TryIdenticalCatches { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } } + + public static void main() { + Throwable causeException; + try { + throw new NullPointerException(); + } catch (final NullPointerException e) { + causeException = e; + } catch (final IllegalArgumentException e) { + causeException = e; + } catch (final IndexOutOfBoundsException e) { + causeException = e; + } + System.out.println("causeException = " + causeException); + } }
\ No newline at end of file |