The "exclude" option for subpackages is not recursive, as indicated in the documentation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The "exclude" option for subpackages is not recursive, as indicated in the documentation

Dawid Weiss-2
Hello,

Javadoc for "exclude" states that [1]:

"Unconditionally, excludes the specified packages and their
subpackages from the list formed by -subpackages."

I find this statement untrue. Given a package structure "a.b.c" and
javadoc options:

-sourcepath src
-subpackages a
-exclude a.b

the resulting javadoc is created for classes in 'a' and 'a.b.c':

https://github.com/dweiss/javadoc-exclude/blob/master/javadoc/element-list

Full repro is on github [2].

Am I missing something? Is the spec wrong or is this a bug?

Dawid

[1] https://docs.oracle.com/en/java/javase/12/tools/javadoc.html
[2] https://github.com/dweiss/javadoc-exclude

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: The "exclude" option for subpackages is not recursive, as indicated in the documentation

Jonathan Gibbons
Dawid,

Thanks for the report; this should be investigated further.

Do you want to file an issue against javadoc, or would you like us to do so?

-- Jon


On 4/30/20 1:59 AM, Dawid Weiss wrote:

> Hello,
>
> Javadoc for "exclude" states that [1]:
>
> "Unconditionally, excludes the specified packages and their
> subpackages from the list formed by -subpackages."
>
> I find this statement untrue. Given a package structure "a.b.c" and
> javadoc options:
>
> -sourcepath src
> -subpackages a
> -exclude a.b
>
> the resulting javadoc is created for classes in 'a' and 'a.b.c':
>
> https://github.com/dweiss/javadoc-exclude/blob/master/javadoc/element-list
>
> Full repro is on github [2].
>
> Am I missing something? Is the spec wrong or is this a bug?
>
> Dawid
>
> [1] https://docs.oracle.com/en/java/javase/12/tools/javadoc.html
> [2] https://github.com/dweiss/javadoc-exclude

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: The "exclude" option for subpackages is not recursive, as indicated in the documentation

Dawid Weiss-2
Hi Jonathan,

I'm sorry for belated reply - your e-mail didn't make it into my inbox
somehow. I can't file an issue because I don't have access to OpenJDK
Jira -- please do it for me. Seems like a bug to me (the documentation
has been there forever and the recursive behavior stated in the docs
seems more useful in practice).

Dawid

On Thu, Apr 30, 2020 at 4:26 PM Jonathan Gibbons
<[hidden email]> wrote:

>
> Dawid,
>
> Thanks for the report; this should be investigated further.
>
> Do you want to file an issue against javadoc, or would you like us to do so?
>
> -- Jon
>
>
> On 4/30/20 1:59 AM, Dawid Weiss wrote:
> > Hello,
> >
> > Javadoc for "exclude" states that [1]:
> >
> > "Unconditionally, excludes the specified packages and their
> > subpackages from the list formed by -subpackages."
> >
> > I find this statement untrue. Given a package structure "a.b.c" and
> > javadoc options:
> >
> > -sourcepath src
> > -subpackages a
> > -exclude a.b
> >
> > the resulting javadoc is created for classes in 'a' and 'a.b.c':
> >
> > https://github.com/dweiss/javadoc-exclude/blob/master/javadoc/element-list
> >
> > Full repro is on github [2].
> >
> > Am I missing something? Is the spec wrong or is this a bug?
> >
> > Dawid
> >
> > [1] https://docs.oracle.com/en/java/javase/12/tools/javadoc.html
> > [2] https://github.com/dweiss/javadoc-exclude

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]