RFR: 8277165: jdeps --multi-release --print-module-deps fails if module-info.class in different versioned directories
Alan Bateman
alanb at openjdk.java.net
Wed Nov 24 10:08:09 UTC 2021
On Tue, 23 Nov 2021 20:54:55 GMT, Mandy Chung <mchung at openjdk.org> 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
More information about the core-libs-dev
mailing list