On Tue, 23 Nov 2021 20:54:55 GMT, Mandy Chung <[email protected]> wrote:
> jdeps intends to report an error if there are multiple versions of the same
> class being parsed. module-info.class should be excluded from such
> detection.
>
> This patch also fixes a data race in `VersionHelper::set` and also unwraps
> the `ExecutionException` when FutureTask of parsing the classes throws an
> exception to report `MultiReleaseException` properly.
Marked as reviewed by alanb (Reviewer).
src/jdk.jdeps/share/classes/com/sun/tools/jdeps/DependencyFinder.java line 277:
> 275: throw (Error)t;
> 276: } else {
> 277: throw new Error(e);
A minor suggestion is that you could avoid the casts with:
Throwable cause = ...
if (cause instanceof RuntimeException e) {
throw e;
} else if (cause instanceof Error e) {
throw e;
} else {
-------------
PR: https://git.openjdk.java.net/jdk/pull/6530