Fwd: RFR: 8190552/8185985: Augment the Compiler API tree ; Html files in doc-files directories should be wrapped

Kumar Srinivasan kumar.x.srinivasan at oracle.com
Thu Nov 9 03:33:35 UTC 2017


Hi Jan, Jon,

Please review:
http://cr.openjdk.java.net/~ksrini/8190552/webrev.02/webrev.delta/
I have included Jan's patch to fix jshell test, add bugid to the tests,
I had missed adding that for the DocCommentParserApi test.

The full webrev is here containing everything for reference
http://cr.openjdk.java.net/~ksrini/8190552/webrev.02

Thanks
Kumar

On 11/8/2017 3:15 PM, Jonathan Gibbons wrote:
> Looks good.  I like the cleanup in DocCommentParser.
>
> The line line of the last file looks inconsistently weird, but as long 
> as the checked in file is good, that is what matters.
>
> -- Jon
>
> On 11/07/2017 08:09 PM, Kumar Srinivasan wrote:
>> Jon,
>>
>> Fixed your comments noted here:
>>
>> updated full webrev:
>> http://cr.openjdk.java.net/~ksrini/8190552/webrev.01/
>>
>> updated delta webrev
>> http://cr.openjdk.java.net/~ksrini/8190552/webrev.01/webrev.delta/
>>
>>
>> Thanks
>> Kumar
>>
>> On 11/7/2017 3:15 PM, Jonathan Gibbons wrote:
>>>
>>> [1] https://bugs.openjdk.java.net/browse/JDK-8190552
>>>
>>> src/jdk.compiler/share/classes/com/sun/source/doctree/DocTypeTree.java
>>> line 32: typo: @lt; should be <    >  should be >
>>>
>>> JavacTrees.java, 1041, 1042, duplicate call
>>>> 1040         DocCommentTree docCommentTree = getDocCommentTree(jfo);
>>>> 1041         docCommentTree = getDocCommentTree(jfo);
>>>
>>> In DocCommentParser, the inPhase field can be reduced to a parameter 
>>> on blockComment.
>>> Also, the following replacement for 191-208 is more robust in the 
>>> face of malformed docs:
>>>
>>>  191                     if (isFileContent) {
>>>  192                         switch (inPhase) {
>>>  193                             case PREAMBLE:
>>>                      if (peek("body") == PeekKind.OPEN) {
>>>  194                                     trees.add(html());
>>>  195                                     if (textStart == -1) {
>>>  196                                         textStart = bp;
>>>  197                                         lastNonWhite = -1;
>>>  198                                     }
>>>  199                                     // mark this as the start, 
>>> for processing purposes
>>>  200                                     newline = true;
>>>  201                                     break loop;
>>>                                      }
>>>                                      break;
>>>  202                             case BLOCK:
>>>                                      if(peek("body") == 
>>> PeekKind.CLOSE) {
>>>  203                                     addPendingText(trees, 
>>> lastNonWhite);
>>>  204                                     break loop;
>>>                                      }
>>>                                      break;
>>>  205                             default:
>>>  206                                 // fall through
>>>  207                         }
>>>  208                     }
>>>
>>> (As a further simplification, you could even make "peek" be "boolean 
>>> peek(String)" and handle the / in the impl of peek, thus eliminating 
>>> PeekKind.)
>>>
>>>
>>> DCTree: 161-165
>>> Format the new lines like the preceding lines (3-line form).
>>>
>>> DCTree: 303,305
>>> Use "text" instead of "body" consistently
>>>
>>> test/langtools/tools/javac/doctree/dcapi/DocCommentTreeApiTester.java
>>> line 196:  do you mean "incorrect" here?   do you mean"invalid"?
>>>     (I don't know what it means to say "incorrect input document")
>>> line 239: ditto
>>>
>>> test/langtools/tools/javac/doctree/dcapi/overview0.html and friends
>>> why do you still need the partial comment "<!--EXPECT_START"
>>>
>>> test/langtools/tools/javac/doctree/dcapi/package.html
>>> <!DOCTYPE...> must be the _first_ line of the file
>>>
>>> On 11/06/2017 06:09 PM, Kumar Srinivasan wrote:
>>>> Hello,
>>>>
>>>> Please review fix to augment the Compiler API tree to represent the 
>>>> entire HTML content of a file, please see bug [1] and webrev [2].
>>>> The above are required to implement the bug [3] and webrev [4], 
>>>> please review these as well.
>>>>
>>>> Please note these patches exist as mq patches in my repo, and will 
>>>> be pushed as two discrete changesets.
>>>>
>>>> Thanks Kumar
>>>>
>>>> [1] https://bugs.openjdk.java.net/browse/JDK-8190552
>>>> [2] http://cr.openjdk.java.net/~ksrini/8190552/webrev.00/
>>>>
>>>> [3] https://bugs.openjdk.java.net/browse/JDK-8185985
>>>> [4] http://cr.openjdk.java.net/~ksrini/8185985/webrev.00/
>>>>
>>>>
>>>
>>
>



More information about the javadoc-dev mailing list