<Swing Dev> [9] Review request for 8058305 BadLocationException is not thrown by javax.swing.text.View.getNextVisualPositionFrom() for invalid positions

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Mon Oct 6 06:46:31 UTC 2014


Hi, Alexander.
The fix looks good.

On 26.09.2014 16:56, Alexander Scherbatiy wrote:
>
>   Could you review the updated fix:
>     http://cr.openjdk.java.net/~alexsch/8058305/webrev.01
>
>   - the position check is added to the missed places
>   - the test is added
>
>  Thanks,
>  Alexandr.
>
> On 9/25/2014 7:04 PM, Alexander Zvegintsev wrote:
>> Hi Alexandr,
>>
>> We still don't throw a BadLocationException if component is not 
>> painted yet.
>> (see BasicTextUI.getNextVisualPositionFrom() at 1121 line).
>> This can be reproduced with sample code from the JBS issue.
>>
>> -- 
>> Thanks,
>> Alexander.
>>
>> On 09/25/2014 06:20 PM, Alexander Scherbatiy wrote:
>>>
>>> Hello,
>>>
>>> Could you review the fix:
>>>   bug: https://bugs.openjdk.java.net/browse/JDK-8058305
>>>   webrev: http://cr.openjdk.java.net/~alexsch/8058305/webrev.00
>>>
>>>   According to the  View.getNextVisualPositionFrom(...) method 
>>> javadoc 
>>> http://docs.oracle.com/javase/8/docs/api/javax/swing/text/View.html
>>>   the BadLocationException should be thrown if the given position is 
>>> not a valid position within the document
>>>
>>>   The issue is covered by JCK tests.
>>>
>>> Thanks,
>>> Alexandr.
>>>
>>
>


-- 
Best regards, Sergey.




More information about the swing-dev mailing list