diff -r 6d1f26b1ddfd -r ac916fea6ec7 src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java Tue Apr 10 17:07:21 2018 +0200 +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java Tue Apr 24 12:20:10 2018 -0700 @@ -138,23 +138,8 @@ List messages = List.nil(); - InferenceException(JCDiagnostic.Factory diags) { - super(diags); - } - - @Override - InapplicableMethodException setMessage() { - throw new AssertionError("InferenceException is immutable"); - } - - @Override - InapplicableMethodException setMessage(JCDiagnostic diag) { - throw new AssertionError("InferenceException is immutable"); - } - - @Override - InapplicableMethodException setMessage(String key, Object... args) { - throw new AssertionError("InferenceException is immutable"); + InferenceException() { + super(null); } @Override @@ -164,7 +149,7 @@ } InferenceException error(JCDiagnostic diag) { - InferenceException result = new InferenceException(diags); + InferenceException result = new InferenceException(); if (diag != null) { result.messages = result.messages.append(diag); }