aajisaka commented on PR #8182:
URL: https://github.com/apache/hadoop/pull/8182#issuecomment-3753598322

   Hi @zhtttylz, you've implemented new custom Doclet to support JDK17 in 
https://github.com/apache/hadoop/pull/8038, however, unfortunately `mvn site` 
fails in Doclet part. The detail is below:
   
   1. RootDocProcessor.process(env) creates a Proxy object that implements 
DocletEnvironment interface
   2. This proxy is passed to StandardDoclet.run(filtered)
   3. Inside the StandardDoclet, the javadoc internals (specifically 
WorkArounds.<init>()) try to cast this proxy to the concrete implementation 
class jdk.javadoc.internal.tool.DocEnvImpl: 
https://github.com/jonathan-gibbons/jdk/blob/bc1e60c1bf91678ef18652a00aa2ce55b0446caa/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java#L112
   4. The cast fails because a proxy object cannot be cast to a concrete 
implementation class
   
   It seems our custom doclet implementation is prohibited after 
https://bugs.openjdk.org/browse/JDK-8253736:
   
   > One particularly annoying wart is the cast on DocletEnvironment to 
DocEnvImpl, which effectively prevents using subtypes to carry additional info. 
It is not clear (even now) what the best way is to replace that logic.
   
   Now I feel it's becoming really hard to maintain Hadoop's custom Doclets, 
and therefore I would like to drop the custom implementation. The primary 
change is we are going to build Hadoop JavaDoc with `@LimitedPrivate`, 
`@Private` or `@Unstable` classes, which are now excluded by our custom Doclets.
   
   @slfan1989 @cnauroth @zhtttylz What do you think? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to