8262944: Improve exception message when automatic module lists provider class not in JAR file

Reviewed-by: dfuchs, jvernee, alanb, lancea, mchung
This commit is contained in:
Christian Stein 2021-10-06 15:11:28 +00:00 committed by Alan Bateman
parent b8af6a9bfb
commit c10de3538b
2 changed files with 25 additions and 6 deletions

View file

@ -551,7 +551,7 @@ public class ModulePath implements ModuleFinder {
if (!cn.isEmpty()) {
String pn = packageName(cn);
if (!packages.contains(pn)) {
String msg = "Provider class " + cn + " not in module";
String msg = "Provider class " + cn + " not in JAR file " + fn;
throw new InvalidModuleDescriptorException(msg);
}
providerClasses.add(cn);