<Swing Dev> GapContent behaviour

Phil Race Phil.Race at Sun.COM
Thu Oct 11 18:37:48 UTC 2007


Not my area but it sounds like a bug and yes, I believe
David Gilbert submitted this bug :

http://bugs.sun.com/view_bug.do?bug_id=6463646

-phil

Roman Kennke wrote:
> Ping! Any opinion on this one?
> 
> /Roman
> 
> Am Donnerstag, den 27.09.2007, 21:01 +0200 schrieb Roman Kennke:
>> Hello,
>>
>> while implementing GapContent back then in GNU Classpath, I noticed that
>> the JDK implementation does not exactly conform to the specs in
>> AbstractDocument.Content. There, all the methods are specified to throw
>> a BadLocationException for invalid locations. However, the GapContent
>> doesn't throw an exception there. For example, it is possible to create
>> a Position for a location that is outside the GapContent object.
>>
>> I'm not sure if I'm mis-interpreting the specification here. It could be
>> argued that it means, the implementation MAY throw an exception in such
>> a case, but doesn't HAVE TO. OTOH, not doing so in the reference
>> implementation might lead application implementors to rely on less
>> strict behaviour which can easily break on different implementations.
>>
>> What do you think?
>>
>> BTW, we observed a number of other places where the spec and the
>> behaviour diverged in Swing. David, do you recall some of these? I think
>> you even filed bug reports about some, right?
>>
>> Cheers, Roman



More information about the swing-dev mailing list