RFR: 8325369: @sealedGraph: Bad link to image for tag on nested classes

Chen Liang liach at openjdk.org
Thu Jul 11 15:12:57 UTC 2024


On Wed, 10 Jul 2024 21:47:52 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> Fixes the link to the generated sealed graph svg generated by the sealed graph taglet.
>> 
>> Affected interfaces includes [`ClassFile.Option`](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8325369-nested-sealed-svg/api/java.base/java/lang/classfile/ClassFile.Option.html) ([before](https://download.java.net/java/early_access/jdk23/docs/api/java.base/java/lang/classfile/ClassFile.Option.html)), [`AnnotationValue.OfConstant`](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8325369-nested-sealed-svg/api/java.base/java/lang/classfile/AnnotationValue.OfConstant.html) ([before](https://download.java.net/java/early_access/jdk23/docs/api/java.base/java/lang/classfile/AnnotationValue.OfConstant.html)), a few [nested interfaces](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8325369-nested-sealed-svg/api/java.base/java/lang/classfile/Signature.html#nested-class-summary) in `Signature` ([original](https://download.java.net/java/early_access/jdk23/docs/api/java.base/java/lang/classfile/Signature.html#nested-class-summary)), and [`TypeAnnotaton.TargetInfo`](https://cr.openjdk.org/~nben
 alla/GeneratedDocs/8325369-nested-sealed-svg/api/java.base/java/lang/classfile/TypeAnnotation.TargetInfo.html) ([before](https://download.java.net/java/early_access/jdk23/docs/api/java.base/java/lang/classfile/TypeAnnotation.TargetInfo.html)).
>> 
>> Courtesy to @nizarbenalla for hosting the updated doc rendering.
>
> make/jdk/src/classes/build/tools/taglet/SealedGraph.java line 324:
> 
>> 322:         while (element.getNestingKind() == NestingKind.MEMBER) {
>> 323:             element = (TypeElement) element.getEnclosingElement();
>> 324:             result = element.getSimpleName().toString() + '.' + result;
> 
> This would be slightly simpler as `element.getSimpleName() + "." + result`

I am inclined to keep to code as-is, as I just moved this static method to the top-level class without extra changes so the top-level class can access it without weird qualifications.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20122#discussion_r1674188742


More information about the build-dev mailing list