24 import static com.sun.tools.classfile.TypeAnnotation.TargetType.*; |
24 import static com.sun.tools.classfile.TypeAnnotation.TargetType.*; |
25 |
25 |
26 /* |
26 /* |
27 * @test |
27 * @test |
28 * @bug 8006732 8006775 |
28 * @bug 8006732 8006775 |
29 * @ignore 8013408: Need specification for type exceptions on multicatch |
|
30 * @summary Test population of reference info for multicatch exception parameters |
29 * @summary Test population of reference info for multicatch exception parameters |
31 * @author Werner Dietl |
30 * @author Werner Dietl |
32 * @compile -g Driver.java ReferenceInfoUtil.java MultiCatch.java |
31 * @compile -g Driver.java ReferenceInfoUtil.java MultiCatch.java |
33 * @run main Driver MultiCatch |
32 * @run main Driver MultiCatch |
34 */ |
33 */ |
51 public String multiCatch2() { |
50 public String multiCatch2() { |
52 return "void multiCatch2() { " + |
51 return "void multiCatch2() { " + |
53 "try { new Object(); } catch (@TA NullPointerException | @TB IndexOutOfBoundsException | @TC IllegalArgumentException e) { e.toString(); } }"; |
52 "try { new Object(); } catch (@TA NullPointerException | @TB IndexOutOfBoundsException | @TC IllegalArgumentException e) { e.toString(); } }"; |
54 } |
53 } |
55 |
54 |
|
55 @TADescriptions({ |
|
56 @TADescription(annotation = "TA", type = EXCEPTION_PARAMETER, exceptionIndex = 1), |
|
57 @TADescription(annotation = "TB", type = EXCEPTION_PARAMETER, exceptionIndex = 1), |
|
58 @TADescription(annotation = "TC", type = EXCEPTION_PARAMETER, exceptionIndex = 2), |
|
59 @TADescription(annotation = "TD", type = EXCEPTION_PARAMETER, exceptionIndex = 2), |
|
60 @TADescription(annotation = "TE", type = EXCEPTION_PARAMETER, exceptionIndex = 3), |
|
61 }) |
|
62 public String multiCatch3() { |
|
63 return "void multiCatch3() { " + |
|
64 "try { new Object(); } catch (NullPointerException e1) {}" + |
|
65 "try { new Object(); } catch (@TA @TB NullPointerException | @TC @TD IndexOutOfBoundsException | @TE IllegalArgumentException e2) { e2.toString(); } }"; |
|
66 } |
56 } |
67 } |