<Swing Dev> JDK9 Review Request for JDK-7104635 HTMLEditorKit fails to write down some html files
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Tue Dec 8 20:18:45 UTC 2015
Hi, Rajeev.
Did you check another place where it is decremented?
Also it seems this change in some way contradicts the specification of
getIndentLevel() method, because it is quite general:
/**
* Returns the current indentation level. That is, the number of times
* <code>incrIndent</code> has been invoked minus the number of times
* <code>decrIndent</code> has been invoked.
* @return the current indentation level
* @since 1.3
*/
it is unclear can it return negative value or not.
On 26/11/15 11:36, Rajeev Chamyal wrote:
> Hello All,
>
> Please review the following fix for Jdk9:
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-7104635
>
> Webrev: http://cr.openjdk.java.net/~rchamyal/7104635/webrev.00/
>
> Issue: If the minimized HTML has spaces the writing is failing with
> index out of bounds exception.
>
> Cause: The AbstractWriter::indent method is passing negative length of
> indentChars to writer.
>
> Fix: Added checks for negative value while decrementing the
> AbstractWriter::indentlevel.
>
> Regards,
>
> Rajeev Chamyal
>
--
Best regards, Sergey.
More information about the swing-dev
mailing list