Skip to content

Commit

Permalink
8321703: jdeps generates illegal dot file containing nodesep=0,500000
Browse files Browse the repository at this point in the history
8325262: jdeps can drop printing stack trace when FindException is thrown due to modules not found

Reviewed-by: jpai, alanb
  • Loading branch information
Mandy Chung committed Feb 6, 2024
1 parent 50b17d9 commit b814c31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -32,6 +32,7 @@

import java.io.IOException;
import java.io.PrintWriter;
import java.lang.module.FindException;
import java.lang.module.ResolutionException;
import java.nio.file.Files;
import java.nio.file.Path;
Expand Down Expand Up @@ -534,7 +535,7 @@ int run(String... args) {
log.println(getMessage("main.usage.summary", PROGNAME));
}
return EXIT_CMDERR;
} catch (ResolutionException e) {
} catch (ResolutionException | FindException e) {
reportError("err.exception.message", e.getMessage());
return EXIT_CMDERR;
} catch (IOException e) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -353,7 +353,7 @@ public void build(Path filename) throws IOException {
PrintWriter out = new PrintWriter(writer)) {

out.format("digraph \"%s\" {%n", name);
out.format(" nodesep=%f;%n", attributes.nodeSep());
out.format((Locale)null, " nodesep=%f;%n", attributes.nodeSep());
out.format((Locale)null, " ranksep=%f;%n", attributes.rankSep());
out.format(" pencolor=transparent;%n");
out.format(" node [shape=plaintext, fontcolor=\"%s\", fontname=\"%s\","
Expand Down

1 comment on commit b814c31

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.