RFR: JDK-8218055: Use ToolProvider instead of AppRuntimeImageBuilder.

Mandy Chung mandy.chung at oracle.com
Fri Feb 22 01:54:08 UTC 2019



On 2/21/19 4:49 PM, Andy Herrick wrote:
> Please review the jpackage fix for bug [1] at [2].
> 
> This is a fix for the JDK-8200758-branch branch of the open sandbox 
> repository (jpackage).
> 
> This enhancement removes the use of 
> jdk.tools.jlink.internal.packager.AppRuntimeImageBuilder in favor of 
> invoking jlink directly thru the ToolProvider interface, with associated 
> code cleanup.
> 
> [1] https://bugs.openjdk.java.net/browse/JDK-8218055
> 
> [2] http://cr.openjdk.java.net/~herrick/8218055/webrev.02

I only skimmed on the patch.  A couple of comments:

   73             () -> new RuntimeException("link tool not found"));

s/link/jlink/

Instead of RuntimeException, should this error be localized?
Does jpackage require jdk.jlink?  Then this would never reach.

  424         Files.deleteIfExists(output); // jlink will re-create

This would fail if output directory is not empty.

  453         args,add("--bind-services");

s/,/. (does this compile?)

jdk.tools.jlink.internal.packager.AppRuntimeImageBuilder class is no
longer needed.  This should be removed.

Mandy


More information about the core-libs-dev mailing list