8282574: Cleanup unnecessary calls to Throwable.initCause() in jdk.compiler
Reviewed-by: darcy
This commit is contained in:
parent
10ccfffae1
commit
e8caf84fb9
src/jdk.compiler/share/classes/com/sun/tools/javac
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -300,10 +300,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
|
||||
try {
|
||||
processorIterator = List.of(new PrintingProcessor()).iterator();
|
||||
} catch (Throwable t) {
|
||||
AssertionError assertError =
|
||||
new AssertionError("Problem instantiating PrintingProcessor.");
|
||||
assertError.initCause(t);
|
||||
throw assertError;
|
||||
throw new AssertionError("Problem instantiating PrintingProcessor.", t);
|
||||
}
|
||||
} else if (processors != null) {
|
||||
processorIterator = processors.iterator();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -194,9 +194,7 @@ public class Pretty extends JCTree.Visitor {
|
||||
tree.accept(this);
|
||||
}
|
||||
} catch (UncheckedIOException ex) {
|
||||
IOException e = new IOException(ex.getMessage());
|
||||
e.initCause(ex);
|
||||
throw e;
|
||||
throw new IOException(ex.getMessage(), ex);
|
||||
} finally {
|
||||
this.prec = prevPrec;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user