Bug 534418 - [Javadoc] formatting broken for {@code ... } tags
Summary: [Javadoc] formatting broken for {@code ... } tags
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7.3   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-07 03:20 EDT by Lukas Eder CLA
Modified: 2022-10-28 05:21 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Eder CLA 2018-05-07 03:20:29 EDT
Consider the Javadoc display of Stream.flatMap() as displayed in the Javadoc view. It is rendered as such:

--------------------------------------------------------
If path is the path to a file, then the following produces a stream of the words contained in that file: 

Stream<String> lines = Files.lines(path, StandardCharsets.UTF_8);
     Stream<String> words = lines.flatMap(line -> Stream.of(line.split(" +")));
--------------------------------------------------------

The second line has an indentation of 5 whitespaces.

Also, the Javadoc display of Stream.reduce(BinaryOperator) has an excess closing curly brace:

--------------------------------------------------------
boolean foundAny = false;
     T result = null;
     for (T element : this stream) {
         if (!foundAny) {
             foundAny = true;
             result = element;
         }
         else
             result = accumulator.apply(result, element);
     }
     return foundAny ? Optional.of(result) : Optional.empty();
 }
--------------------------------------------------------

... which is really the closing curly brace of the {@code} tag, not part of the code itself.
Comment 1 Eclipse Genie CLA 2020-09-18 15:16:49 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Eclipse Genie CLA 2022-10-28 05:21:11 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.