On Thu, 31 Oct 2024 12:48:38 GMT, Nizar Benalla <nbena...@openjdk.org> wrote:

>> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/LinkTaglet.java
>>  line 253:
>> 
>>> 251:             if (refSignature.trim().startsWith("#") &&
>>> 252:                     ! (utils.isPublic(containing) || 
>>> utils.isLinkable(containing)) &&
>>> 253:                     ! (utils.isPrivate(refMem) 
>>> ||utils.isPackagePrivate(refMem))) {
>> 
>> Shouldn't this take into account whether we are running with -private or 
>> -package options? Ideally using utils.isIncluded(Element) would take care of 
>> this and give the right answer in all cases, although I haven't tried.
>
> I will double check how this affects the `-package` option but this code path 
> is not taken when using `-private`. I assume that's because the holder will 
> then be accessible

I observed no changes when building javadoc using `-private` or `-package` 
before/after the change, I don't think this code path is taken in those cases.
`utils.isIncluded(refMem)`/`utils.isIncluded(containing)` is always false, I 
wasn't sure how to use it. (Which element should I check?)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21802#discussion_r1824437676

Reply via email to