Skip to content

Commit

Permalink
Only show info message about runtime link when verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
jerboaa committed Oct 15, 2024
1 parent 4a50b4c commit 6859a3b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ private static ImageHelper createImageProvider(JlinkConfiguration config,

// Perform some sanity checks for linkable JDK runtimes
if (config.linkFromRuntimeImage()) {
sanityChecksLinkableJDKRuntime(log, cf);
sanityChecksLinkableJDKRuntime(log, cf, verbose);
}

if (verbose && log != null) {
Expand Down Expand Up @@ -727,7 +727,8 @@ private static ImageHelper createImageProvider(JlinkConfiguration config,
* @throws IOException
*/
private static void sanityChecksLinkableJDKRuntime(PrintWriter log,
Configuration cf) throws IOException {
Configuration cf,
boolean verbose) throws IOException {
// Catch the case where we don't have a linkable JDK runtime. If so,
// we don't have the per module resource diffs in the modules image
String resourceName = String.format(DIFF_PATTERN, "java.base");
Expand All @@ -745,7 +746,7 @@ private static void sanityChecksLinkableJDKRuntime(PrintWriter log,

// Print info message indicating jlink is performed on a linkable JDK
// runtime
if (log != null) {
if (log != null && verbose) {
log.println(taskHelper.getMessage("runtime.link.info"));
}
}
Expand Down

0 comments on commit 6859a3b

Please sign in to comment.