test/tools/javac/lambda/lambdaExpression/SamConversionComboTest.java

changeset 2370
acd64168cf8b
parent 2227
998b10c43157
child 2525
2eb010b6cb22
     1.1 --- a/test/tools/javac/lambda/lambdaExpression/SamConversionComboTest.java	Fri Apr 18 23:58:05 2014 +0100
     1.2 +++ b/test/tools/javac/lambda/lambdaExpression/SamConversionComboTest.java	Tue Apr 22 17:55:22 2014 +0100
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -209,7 +209,11 @@
    1.11          final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
    1.12          DiagnosticChecker dc = new DiagnosticChecker();
    1.13          JavacTask ct = (JavacTask)tool.getTask(null, null, dc, null, null, Arrays.asList(samSourceFile, clientSourceFile));
    1.14 -        ct.analyze();
    1.15 +        try {
    1.16 +            ct.analyze();
    1.17 +        } catch (Exception e) {
    1.18 +            throw new AssertionError("failing SAM source file \n" + samSourceFile + "\n\n" + "failing client source file \n"+ clientSourceFile);
    1.19 +        }
    1.20          if (dc.errorFound == checkSamConversion()) {
    1.21              throw new AssertionError(samSourceFile + "\n\n" + clientSourceFile);
    1.22          }

mercurial