After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 563173 - StringIndexOutOfBoundsException can be thrown in Java Access Bridge
StringIndexOutOfBoundsException can be thrown in Java Access Bridge
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: javabridge
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Willie Walker
Jeff Cai
Depends on:
Blocks:
 
 
Reported: 2008-12-03 23:28 UTC by Willie Walker
Modified: 2008-12-04 20:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Stack trace (3.41 KB, text/plain)
2008-12-03 23:29 UTC, Willie Walker
  Details
Patch (1.46 KB, patch)
2008-12-03 23:29 UTC, Willie Walker
committed Details | Review

Description Willie Walker 2008-12-03 23:28:17 UTC
From e-mail on gnome-accessibility-devel (http://mail.gnome.org/archives/gnome-accessibility-devel/2008-December/msg00004.html):

This is a patch for the java-access-bridge in gnome 
(http://live.gnome.org/Java%20Access%20Bridge). Using a swing 
JTextField, if a user selects text and starts typing to replace it, a 
StringIndexOutOfBoundsException is thrown in .

The following events are observed through acccerciser in gedit when 
selecting text and typing over it:
object:text-changed:delete
object:text-changed:insert
object:text-caret-moved

While the Swing program only emits
object:text-changed:delete
object:text-changed:insert

The 'object:text-caret-moved' event is not sent. The attached patch 
catches the exception and silently ignores it, ensuring the 
selection-changed event is not sent and the text-caret-moved event is.
Comment 1 Willie Walker 2008-12-03 23:29:08 UTC
Created attachment 123909 [details]
Stack trace
Comment 2 Willie Walker 2008-12-03 23:29:28 UTC
Created attachment 123910 [details] [review]
Patch
Comment 3 Jeff Cai 2008-12-04 05:35:27 UTC
Patch is good. Please commit.
Comment 4 Willie Walker 2008-12-04 20:43:24 UTC
Committed to trunk.  Thanks!  Closing as FIXED.