On Fri, 9 Jul 2021 17:59:35 GMT, Andy Herrick <herr...@openjdk.org> wrote:
>> JDK-8269387: jpackage --add-launcher should have option to not create >> shortcuts for additional launchers > > Andy Herrick has updated the pull request incrementally with one additional > commit since the last revision: > > JDK-8269387: jpackage --add-launcher should have option to not create > shortcuts for additional launchers Changes requested by asemenyuk (Reviewer). test/jdk/tools/jpackage/helpers/jdk/jpackage/test/AdditionalLauncher.java line 84: > 82: } > 83: > 84: public AdditionalLauncher setShortcuts(boolean menu, boolean desktop) > { I'd expect verifyShortcuts() method added to this class and called from verify() similar to how verifyIcon() is called. This would make AddLShortcutTest.java do some automatic testing of shortcuts. Something like this: private void verify(JPackageCommand cmd) throws IOException { verifyIcon(cmd); verifyShortcuts(cmd); ... } public AdditionalLauncher setShortcuts(boolean menu, boolean desktop) { withMenuShortcut = menu; withDesktopShortcut = desktop; return this; } private void verifyShortcuts(JPackageCommand cmd) throws IOException { if (TKit.isLinux() && !cmd.isImagePackageType() && withMenuShortcut != null) { Path desktopFile = LinuxHelper.getDesktopFile(cmd, name); if (withMenuShortcut) { TKit.assertFileExists(desktopFile); } else { TKit.assertPathExists(desktopFile, false); } } } private Boolean withMenuShortcut; private Boolean withDesktopShortcut; ------------- PR: https://git.openjdk.java.net/jdk/pull/4730