Re: RFR: JDK-8285939: javadoc java.lang.Record should not have "Direct Known Subclasses:" section [v2]

2022-05-25 Thread Jonathan Gibbons
On Wed, 25 May 2022 10:48:43 GMT, Hannes Wallnöfer wrote: >> Jonathan Gibbons has updated the pull request with a new target base due to >> a merge or a rebase. The pull request now contains three commits: >> >> - merge with upstream master >> - fix copyright; update test description >> - JD

Re: RFR: JDK-8285939: javadoc java.lang.Record should not have "Direct Known Subclasses:" section [v3]

2022-05-25 Thread Jonathan Gibbons
> As described in the JBS issue, the observed problem is a side-effect of a > related but different issue, which is that record classes are not treated the > same was as enum classes when it comes to generating the class hierarchy in > `ClassTree`. Because record classes are not treated speciall

Re: RFR: JDK-8285939: javadoc java.lang.Record should not have "Direct Known Subclasses:" section [v2]

2022-05-25 Thread Jonathan Gibbons
On Wed, 25 May 2022 19:43:55 GMT, Jonathan Gibbons wrote: >> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractTreeWriter.java >> line 94: >> >>> 92: } >>> 93: >>> 94: protected void addTree(Hierarchy hierarchy, String heading, Content >>> content) { >>

Re: RFR: JDK-8285939: javadoc java.lang.Record should not have "Direct Known Subclasses:" section [v2]

2022-05-25 Thread Jonathan Gibbons
On Wed, 25 May 2022 10:22:15 GMT, Hannes Wallnöfer wrote: >> Jonathan Gibbons has updated the pull request with a new target base due to >> a merge or a rebase. The pull request now contains three commits: >> >> - merge with upstream master >> - fix copyright; update test description >> - JD

RFR: JDK-8287337: SnippetUtils should throw exceptions if snippets not found

2022-05-25 Thread Jonathan Gibbons
Please review a simple change for `SnippetUtils` to throw a checked exception if a snippet cannot be found. - Commit messages: - JDK-8287337: SnippetUtils should throw exceptions if snippets not found Changes: https://git.openjdk.java.net/jdk/pull/8892/files Webrev: https://webrev

Integrated: JDK-8279513: jdk/javadoc/doclet/testDocletExample/TestDocletExample.java fails after 8278795

2022-05-25 Thread Jonathan Gibbons
On Thu, 19 May 2022 22:05:50 GMT, Jonathan Gibbons wrote: > Please review a test-only fix to make a recent new test more robust. > > The test was not fundamentally broken, so the essential functionality remains > the same. However, it does assume access to the `src/jdk.javadoc` directory, > an

Integrated: JDK-8284037: Snippet-files subdirectory not automatically detected when in unnamed package

2022-05-25 Thread Jonathan Gibbons
On Fri, 13 May 2022 21:51:32 GMT, Jonathan Gibbons wrote: > Please review a small fix to address use of snippets in source code in the > unnamed package. > > The core of the fix is to replace `packageName(pkg, utils)` (which returns > `""` for the unnamed package) with plain old > `pkg.getQua

Re: RFR: JDK-8279513: jdk/javadoc/doclet/testDocletExample/TestDocletExample.java fails after 8278795

2022-05-25 Thread Jonathan Gibbons
On Wed, 25 May 2022 17:24:22 GMT, Pavel Rappo wrote: > > I'd prefer to leave updates to SnippetIUtils to its own separate > > Enhancement. > > Sounds good. [JDK-8287337](https://bugs.openjdk.java.net/browse/JDK-8287337) - PR: https://git.openjdk.java.net/jdk/pull/8796

Re: RFR: JDK-8279513: jdk/javadoc/doclet/testDocletExample/TestDocletExample.java fails after 8278795

2022-05-25 Thread Pavel Rappo
On Thu, 19 May 2022 22:05:50 GMT, Jonathan Gibbons wrote: > Please review a test-only fix to make a recent new test more robust. > > The test was not fundamentally broken, so the essential functionality remains > the same. However, it does assume access to the `src/jdk.javadoc` directory, > an

Re: RFR: JDK-8279513: jdk/javadoc/doclet/testDocletExample/TestDocletExample.java fails after 8278795

2022-05-25 Thread Jonathan Gibbons
On Wed, 25 May 2022 17:11:59 GMT, Jonathan Gibbons wrote: >>> `SnippetUtils` is broken if we get a null result. >> >> If it's unconditionally so, which it seems to be, wouldn't it be better to >> throw something from `SnippetUtils.getSnippetById` instead? > > Hmmm, The current spec of `SnippetU

Re: RFR: JDK-8279513: jdk/javadoc/doclet/testDocletExample/TestDocletExample.java fails after 8278795

2022-05-25 Thread Jonathan Gibbons
On Wed, 25 May 2022 17:19:22 GMT, Pavel Rappo wrote: >> Yes. Although we could throw NPE even here, I was wanting to throw something >> that indicates the test is dysfunctional, as compared to failing or crashing. > > The rationale that you provided reminds of `new > FileInputStream(java.io.Fil

Re: RFR: JDK-8279513: jdk/javadoc/doclet/testDocletExample/TestDocletExample.java fails after 8278795

2022-05-25 Thread Pavel Rappo
On Wed, 25 May 2022 16:59:25 GMT, Jonathan Gibbons wrote: >> test/langtools/jdk/javadoc/doclet/testDocletExample/TestDocletExample.java >> line 71: >> >>> 69: var entryPointSnippet = snippets.getSnippetById(dc, >>> "entry-point"); >>> 70: if (entryPointSnippet == null) { >>> 71

Re: RFR: JDK-8279513: jdk/javadoc/doclet/testDocletExample/TestDocletExample.java fails after 8278795

2022-05-25 Thread Jonathan Gibbons
On Wed, 25 May 2022 17:07:36 GMT, Pavel Rappo wrote: >> Yes, same reasoning. `SnippetUtils` is broken if we get a null result. > >> `SnippetUtils` is broken if we get a null result. > > If it's unconditionally so, which it seems to be, wouldn't it be better to > throw something from `SnippetUti

Re: RFR: JDK-8279513: jdk/javadoc/doclet/testDocletExample/TestDocletExample.java fails after 8278795

2022-05-25 Thread Pavel Rappo
On Wed, 25 May 2022 17:02:15 GMT, Jonathan Gibbons wrote: > `SnippetUtils` is broken if we get a null result. If it's unconditionally so, which it seems to be, wouldn't it be better to throw something from `SnippetUtils.getSnippetById` instead? - PR: https://git.openjdk.java.net/j

Re: RFR: JDK-8284037: Snippet-files subdirectory not automatically detected when in unnamed package [v3]

2022-05-25 Thread Pavel Rappo
On Wed, 25 May 2022 17:00:16 GMT, Jonathan Gibbons wrote: >> Please review a small fix to address use of snippets in source code in the >> unnamed package. >> >> The core of the fix is to replace `packageName(pkg, utils)` (which returns >> `""` for the unnamed package) with plain old >> `pkg.

Re: RFR: JDK-8279513: jdk/javadoc/doclet/testDocletExample/TestDocletExample.java fails after 8278795

2022-05-25 Thread Jonathan Gibbons
On Tue, 24 May 2022 18:39:06 GMT, Pavel Rappo wrote: >> Please review a test-only fix to make a recent new test more robust. >> >> The test was not fundamentally broken, so the essential functionality >> remains the same. However, it does assume access to the `src/jdk.javadoc` >> directory, an

Re: RFR: JDK-8284037: Snippet-files subdirectory not automatically detected when in unnamed package [v3]

2022-05-25 Thread Jonathan Gibbons
> Please review a small fix to address use of snippets in source code in the > unnamed package. > > The core of the fix is to replace `packageName(pkg, utils)` (which returns > `""` for the unnamed package) with plain old > `pkg.getQualifiedName().toString()` (which returns an empty string for

Re: RFR: JDK-8284037: Snippet-files subdirectory not automatically detected when in unnamed package [v2]

2022-05-25 Thread Jonathan Gibbons
On Tue, 24 May 2022 19:46:51 GMT, Pavel Rappo wrote: >> Jonathan Gibbons has updated the pull request incrementally with one >> additional commit since the last revision: >> >> address review feedback > > src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SnippetTaglet

RFR: 8287333: Clean up ParamTaglet and ThrowsTaglet

2022-05-25 Thread Pavel Rappo
A cleanup to facilitate fixing bugs like JDK-6509045: `{@inheritDoc}` only copies one instance of the specified exception. - Commit messages: - Update top-level doc comment - Trivially re-order assignments - Reformat for clarity - Remove dead condition - Remove emptiness check

Re: RFR: JDK-6251738: Want a top-level summary page that itemizes all spec documents referenced from javadocs (OEM spec) [v8]

2022-05-25 Thread Jonathan Gibbons
> Please review the code and tests to add support for a new `@spec url title` > tag to javadoc. Note, this does not include any changes to API doc comments > to use the new tag in JDK API documentation; that will come later. Jonathan Gibbons has updated the pull request incrementally with one a

Re: RFR: JDK-6251738: Want a top-level summary page that itemizes all spec documents referenced from javadocs (OEM spec) [v7]

2022-05-25 Thread Jonathan Gibbons
On Tue, 3 May 2022 22:16:15 GMT, Jonathan Gibbons wrote: >> test/langtools/jdk/javadoc/doclet/testConditionalPages/TestConditionalPages.java >> line 2: >> >>> 1: /* >>> 2: * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights >>> reserved. >> >> Consider adding 6251738 to `@bu

Re: RFR: JDK-6251738: Want a top-level summary page that itemizes all spec documents referenced from javadocs (OEM spec) [v4]

2022-05-25 Thread Jonathan Gibbons
On Tue, 24 May 2022 16:53:51 GMT, Pavel Rappo wrote: >> Jonathan Gibbons has updated the pull request incrementally with one >> additional commit since the last revision: >> >> address review feedback > > src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SpecTaglet.ja

Re: RFR: JDK-6251738: Want a top-level summary page that itemizes all spec documents referenced from javadocs (OEM spec) [v5]

2022-05-25 Thread Jonathan Gibbons
On Tue, 24 May 2022 21:30:59 GMT, Pavel Rappo wrote: >> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseOptions.java >> line 302: >> >>> 300: >>> 301: /** >>> 302: * Argument for command-line option {@code --spec-base-URI}. >> >> Have my earlier comment on the

Re: RFR: JDK-8285939: javadoc java.lang.Record should not have "Direct Known Subclasses:" section [v2]

2022-05-25 Thread Hannes Wallnöfer
On Tue, 17 May 2022 00:18:07 GMT, Jonathan Gibbons wrote: >> As described in the JBS issue, the observed problem is a side-effect of a >> related but different issue, which is that record classes are not treated >> the same was as enum classes when it comes to generating the class hierarchy >>