<Swing Dev> [9] Review request for 8074956: ArrayIndexOutOfBoundsException in javax.swing.text.html.parser.ContentModel.first()

Alexander Scherbatiy alexandr.scherbatiy at oracle.com
Tue Apr 14 09:24:27 UTC 2015


   The fix looks good to me.

   Thanks,
   Alexandr.

On 4/13/2015 4:34 PM, Alexey Ivanov wrote:
> Hello Swing team,
>
> Could you please review the fix:
>     bug: https://bugs.openjdk.java.net/browse/JDK-8074956
>     webrev: http://cr.openjdk.java.net/~aivanov/8074956/jdk9/webrev.00/
>
> Description:
> Implementation of ContentModel.first(Element) uses cache for elements. 
> It is implied all the possible elements are already created before you 
> call first(Element) method for the first time. If you create a new 
> Element instance and call first(Element) method with it, you'll get 
> ArrayIndexOutOfBoundsException because the implication is now false.
>
> The fix is to re-create arrays used for cache when an "unknown" 
> Element is used as parameter to first(Element).
>
> Thanks,
> Alexey




More information about the swing-dev mailing list