Community
Participate
Working Groups
build I20080520-2000 1) create the java project P 2) change the maximum line width to 40 instead of 80 for comment in formatter preferences 3) create Test.java public class Test { /** * @see <a href="http://0">Test</a> * @see <a href="http://0123">Test</a> * @see <a href="http://012346789">Test</a> * @see <a href="http://012346789012346789012346789">Test</a> */ void foo() { } } 4) format Test.java The result is: public class Test { /** * @see <a href="http://0">Test< /a> * @see <a href="http://0123">Test< * /a> * @see <a * href="http://012346789">Test * < /a> * @see <a href= * "http://012346789012346789012346789" * >Test< /a> */ void foo() { } } In the first 'see' tag a space must not be added </a> html tag. In the second see' tag the </a> must not be split. In the third and in the last 'see' tag perhaps the full tag <a> should not be split. In 3.3.2 the formatted source is: public class Test { /** * @see <a href="http://0">Test</a> * @see <a href="http://0123">Test</a> * @see <a * href="http://012346789">Test</a> * @see <a * href="http://012346789012346789012346789">Test</a> */ void foo() { } }
*** Bug 235464 has been marked as a duplicate of this bug. ***
The problem is that an invalid FormatJavadoc structure is built while parsing the html reference...
Created attachment 105695 [details] Proposed patch The simplest solution to fix this issue is to create a fake reference for strings or href references as the Scribe does not allow to split them elsewhere than at a space position... Note that this patch fixes bug 237942 as well...
Released for 3.5M1 in HEAD stream.
While trying to split the patch between this bug and bug 237942, I realized that it depends on fix for bug 238090. Otherwise, some added tests and even some existing tests fail...
*** Bug 237942 has been marked as a duplicate of this bug. ***
Released for 3.4.1
Verified for 3.5M1 using I20080805-1307
Reopen to close as RESOLVED/FIXED. Will be closed as VERIFIED during 3.4.1 verification pass.
Fixed.
Verified for 3.4.1 using M20080827-2000.