1 package com.puppycrawl.tools.checkstyle.grammar;
2
3 import java.io.*;
4
5
6
7
8 public class InputJava7MultiCatch
9 {
10 public static class CustomException extends Exception { }
11 public static class AnotherCustomException extends RuntimeException { }
12
13 public static void logException(Exception e) { }
14
15 public static void main(String[] args) {
16 try {
17 FileInputStream in = new FileInputStream("InputJava7MultiCatch.java");
18 throw new CustomException();
19 } catch (FileNotFoundException | CustomException e) {
20 logException(e);
21 }
22
23 try {
24 FileInputStream in = new FileInputStream("InputJava7MultiCatch.java");
25 throw new CustomException();
26 } catch (final FileNotFoundException | CustomException | com.puppycrawl.tools.checkstyle.grammar.InputJava7MultiCatch.AnotherCustomException e) {
27 logException(e);
28 }
29 }
30 }