RFR: 8295653: Add a graph of the sealed class hierarchy for marked classes [v4]

Jonathan Gibbons jjg at openjdk.org
Sat Oct 29 00:18:24 UTC 2022


On Mon, 24 Oct 2022 20:44:08 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

>> It would be possible to mark classes with `@sealedGraph` to indicate that the sealed hierarchy should be rendered graphically in the JavaDocs. Classes not marked would be unaffected, creating an opt-in approach.
>> 
>> [Here](https://bugs.openjdk.org/secure/attachment/101126/Screen%20Shot%202022-10-19%20at%2012.47.47%20PM.png) is an example of MemoryLayout class rendering.
>> 
>> This feature has been developed in cooperation with Per Minborg.
>
> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Rename sealedGraphDotPath to sealedDotOutputDir

Some minor comments, but generally OK

make/Main.gmk line 1114:

> 1112:   docs-reference-api: docs-reference-api-graphs
> 1113: 
> 1114:   # We must generated javadoc first so we know what graphs are needed

grammar: `generated` -> `generate`

make/jdk/src/classes/build/tools/taglet/SealedGraph.java line 40:

> 38: import java.util.*;
> 39: import java.util.stream.Collectors;
> 40: 

Weirdly-sorted imports.  It is common practice to put `java.*` and `java.*` imports first.

make/jdk/src/classes/build/tools/taglet/SealedGraph.java line 106:

> 104:         } catch (FileNotFoundException e) {
> 105:             throw new RuntimeException(e);
> 106:         }

It's certainly unusual for a taglet `.toString` call to have this sort of side effect.   It would not the a showstopper, but have you checked whether this code is just executed once or multiple times?

-------------

Marked as reviewed by jjg (Reviewer).

PR: https://git.openjdk.org/jdk/pull/10761



More information about the build-dev mailing list