// This test case must be first one, the JlinkTask is clean // and reveals possible bug related to plugin options in defaults
testSameNames(helper);
testOptions();
}
privatestaticvoid testSameNames(Helper helper) throws Exception { // Multiple modules with the same name in modulepath, take the first one in the path. // First jmods then jars. So jmods are found, jars are hidden.
String[] jarClasses = {"amodule.jar.Main"};
String[] jmodsClasses = {"amodule.jmods.Main"};
helper.generateDefaultJarModule("amodule", Arrays.asList(jarClasses));
helper.generateDefaultJModule("amodule", Arrays.asList(jmodsClasses));
List<String> okLocations = new ArrayList<>();
okLocations.addAll(Helper.toLocation("amodule", Arrays.asList(jmodsClasses)));
Path image = helper.generateDefaultImage(new String[0], "amodule").assertSuccess();
JImageValidator validator = new JImageValidator("amodule", okLocations,
image.toFile(), Collections.emptyList(), Collections.emptyList());
validator.validate();
}
privatestaticvoid testOptions() throws Exception {
List<Plugin> builtInPlugins = new ArrayList<>();
builtInPlugins.addAll(PluginRepository.getPlugins(ModuleLayer.boot())); if(builtInPlugins.isEmpty()) { thrownew Exception("No builtin plugins");
}
List<String> options = new ArrayList<>(); for (Plugin p : builtInPlugins) { if (p.getOption() == null) { thrownew Exception("Null option for " + p.getName());
} if (options.contains(p.getName())) { thrownew Exception("Option " + p.getOption() + " used more than once");
}
options.add(p.getName());
}
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-10-11)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.