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

changeset 1755
ddb4a2bfcd82
parent 1534
bec996065c45
child 2303
dac1b0a17386
     1.1 --- a/test/tools/javac/annotations/typeAnnotations/referenceinfos/ExceptionParameters.java	Tue May 14 13:55:35 2013 -0700
     1.2 +++ b/test/tools/javac/annotations/typeAnnotations/referenceinfos/ExceptionParameters.java	Tue May 14 15:04:06 2013 -0700
     1.3 @@ -47,11 +47,43 @@
     1.4          @TADescription(annotation = "TB", type = EXCEPTION_PARAMETER, exceptionIndex = 1),
     1.5          @TADescription(annotation = "TC", type = EXCEPTION_PARAMETER, exceptionIndex = 2)
     1.6      })
     1.7 -    public String multipleExceptions() {
     1.8 +    public String multipleExceptions1() {
     1.9          return "void multipleExceptions() { " +
    1.10              "try { new Object(); } catch(@TA Exception e) { }" +
    1.11              "try { new Object(); } catch(@TB Exception e) { }" +
    1.12              "try { new Object(); } catch(@TC Exception e) { }" +
    1.13              " }";
    1.14      }
    1.15 +
    1.16 +    @TADescriptions({
    1.17 +        @TADescription(annotation = "TA", type = EXCEPTION_PARAMETER, exceptionIndex = 0),
    1.18 +        @TADescription(annotation = "TB", type = EXCEPTION_PARAMETER, exceptionIndex = 1),
    1.19 +        @TADescription(annotation = "TC", type = EXCEPTION_PARAMETER, exceptionIndex = 2)
    1.20 +    })
    1.21 +    public String multipleExceptions2() {
    1.22 +        return "void multipleExceptions() { " +
    1.23 +            "  try { new Object(); " +
    1.24 +            "    try { new Object(); " +
    1.25 +            "      try { new Object(); } catch(@TA Exception e) { }" +
    1.26 +            "    } catch(@TB Exception e) { }" +
    1.27 +            "  } catch(@TC Exception e) { }" +
    1.28 +            "}";
    1.29 +    }
    1.30 +
    1.31 +    @TADescriptions({
    1.32 +        @TADescription(annotation = "TA", type = EXCEPTION_PARAMETER, exceptionIndex = 0),
    1.33 +        @TADescription(annotation = "TB", type = EXCEPTION_PARAMETER, exceptionIndex = 1),
    1.34 +        @TADescription(annotation = "TC", type = EXCEPTION_PARAMETER, exceptionIndex = 2)
    1.35 +    })
    1.36 +    public String multipleExceptions3() {
    1.37 +        return "void multipleExceptions() { " +
    1.38 +            "  try { new Object(); " +
    1.39 +            "  } catch(@TA Exception e1) { "+
    1.40 +            "    try { new Object(); " +
    1.41 +            "    } catch(@TB Exception e2) {" +
    1.42 +            "      try { new Object(); } catch(@TC Exception e3) { }" +
    1.43 +            "    }" +
    1.44 +            "  }" +
    1.45 +            "}";
    1.46 +    }
    1.47  }

mercurial