Community
Participate
Working Groups
Build 3.6M3 but exist since 3.4. Consider the following test case: package wkps3; /** * The formatter is not able to format the current comment: * * <ol> * <li><p> First item * * <li><p> Second item * * <li><p> First paragraph of third item * * <p> Second paragraph of third item * * <blockquote><table cellpadding=0 cellspacing=0 summary="layout"> * <tr><td><tt>::255.255.0.d</tt><td></tr> * </table></blockquote> * </li> * </ol> */ public class X03b { } Nothing happen when trying to format it although there's no MalformedTreeExcetion... Using 3.3.2, the format output is: package wkps3; /** * The formatter was not able to format the current comment: * * <ol> * <li> * <p> * First item * * <li> * <p> * Second item * * <li> * <p> * First paragraph of third item * * <p> * Second paragraph of third item * * <blockquote><table cellpadding=0 cellspacing=0 summary="layout"> * <tr> * <td><tt>::255.255.0.d</tt> * <td></tr> * </table></blockquote> </li> * </ol> */ public class X03b { } So this is a regression introduced when rewrote the comments formatter...
This issue was found while testing patch for bug 294500, I'll investigate as soon as after having released the patch for that bug...
This is not really a regression since in 3.3.2 the comment formatting with incomplete tags was also far from being perfect.
In fact this is not the invalid sequence which cause the grief to the formatter, but rather the deep nesting. E.g. the following correct html tags also failed to be formatted: /** * Verify deep html tag nesting: * * <ol> * <li><p> First item * <li><p> Second item * <ul> * <li><p> First item of second item * <blockquote><table cellpadding=0 cellspacing=0 summary="layout"> * <tr><td><tt><i><b>::255.255.0.d</b></i></tt></td></tr> * </table></blockquote> * </li> * </ul> * </li> * </ol> */ public class X { }
Created attachment 151887 [details] Proposed patch The tags hierarchy stack didn't have enough room for comments with nested depth over 10 items. Just resize it to the maximum possible depth...
Released for 3.6M4 in HEAD stream.
Verified for 3.6M4 using I20091207-1800