Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8178067

support for @uses/@provides tags is broken

XMLWordPrintable

    • b166
    • Verified



        I've been looking at the code, in ModuleWriterImpl, addUsesList, addProvidesList.
        First, I note some wacky indentation in both methods. Ooops.

        It does look like the code is trying to do the right thing, but these lines in addUsesList
        seem questionable, along with the corresponding lines for addProvidesList.

        > // For each uses directive in the module declaration, if we are in the "api" mode and
        > // if there are service types listed using @uses javadoc tag, check if the service type in
        > // the uses directive is specified using the @uses tag. If not, we do not display the
        > // service type in the "api" mode.
        > if (moduleMode == ModuleMode.API && display(usesTrees) && !usesTrees.containsKey(t)) {
        > continue;
        > }

        What this code seems to be doing is, if there are no @uses/@provides tags at all, show all of them.
        That may have been convenient as an interim measure, but it is not clear this is the correct long term solution.
        In particular, it means there is no way to have all the uses/provides directives be private/undocumented,
        since if you provide no @uses/@provides, the doclet will show all.

              ksrini Kumar Srinivasan
              jjg Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: