test/tools/javac/annotations/typeAnnotations/referenceinfos/MultiCatch.java

changeset 1755
ddb4a2bfcd82
parent 1721
abd153854f16
child 2103
b1b4a6dcc282
     1.1 --- a/test/tools/javac/annotations/typeAnnotations/referenceinfos/MultiCatch.java	Tue May 14 13:55:35 2013 -0700
     1.2 +++ b/test/tools/javac/annotations/typeAnnotations/referenceinfos/MultiCatch.java	Tue May 14 15:04:06 2013 -0700
     1.3 @@ -26,7 +26,6 @@
     1.4  /*
     1.5   * @test
     1.6   * @bug 8006732 8006775
     1.7 - * @ignore 8013408: Need specification for type exceptions on multicatch
     1.8   * @summary Test population of reference info for multicatch exception parameters
     1.9   * @author Werner Dietl
    1.10   * @compile -g Driver.java ReferenceInfoUtil.java MultiCatch.java
    1.11 @@ -53,4 +52,16 @@
    1.12              "try { new Object(); } catch (@TA NullPointerException | @TB IndexOutOfBoundsException | @TC IllegalArgumentException e) { e.toString(); } }";
    1.13      }
    1.14  
    1.15 +    @TADescriptions({
    1.16 +        @TADescription(annotation = "TA", type = EXCEPTION_PARAMETER, exceptionIndex = 1),
    1.17 +        @TADescription(annotation = "TB", type = EXCEPTION_PARAMETER, exceptionIndex = 1),
    1.18 +        @TADescription(annotation = "TC", type = EXCEPTION_PARAMETER, exceptionIndex = 2),
    1.19 +        @TADescription(annotation = "TD", type = EXCEPTION_PARAMETER, exceptionIndex = 2),
    1.20 +        @TADescription(annotation = "TE", type = EXCEPTION_PARAMETER, exceptionIndex = 3),
    1.21 +    })
    1.22 +    public String multiCatch3() {
    1.23 +        return "void multiCatch3() { " +
    1.24 +            "try { new Object(); } catch (NullPointerException e1) {}" +
    1.25 +            "try { new Object(); } catch (@TA @TB NullPointerException | @TC @TD IndexOutOfBoundsException | @TE IllegalArgumentException e2) { e2.toString(); } }";
    1.26 +    }
    1.27  }

mercurial