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 309543 - TextBuffer.markExists() always returns true
TextBuffer.markExists() always returns true
Status: VERIFIED FIXED
Product: java-gnome
Classification: Bindings
Component: GTK
Not Applicable
Other Linux
: Normal normal
: ---
Assigned To: Ismael Juma
Ismael Juma
Depends on:
Blocks:
 
 
Reported: 2005-07-05 17:10 UTC by Igor Foox
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Example of a simple breaking case (366 bytes, text/plain)
2005-07-05 17:18 UTC, Igor Foox
  Details
Patch for the 2-6 branch (595 bytes, patch)
2005-07-15 17:16 UTC, Igor Foox
none Details | Review
A more sophisticated test case (605 bytes, text/plain)
2005-07-15 17:17 UTC, Igor Foox
  Details

Description Igor Foox 2005-07-05 17:10:50 UTC
Version details: 2.6
Distribution/Version: Red Hat Fedora Core 4

The method markExists(String name) in the class TextBuffer always returns true,
no matter whether it should actually return false or not. This happens
consistently in gtk 2.6.
Comment 1 Igor Foox 2005-07-05 17:18:52 UTC
Created attachment 48680 [details]
Example of a simple breaking case

Here is a small sample program that illustrates the problem, it simply
initializes the gtk main loop, then creates a TextBuffer and then checks if it
has a mark (which was not added).
Comment 2 Ismael Juma 2005-07-15 16:01:07 UTC
Works with HEAD. So the problem is just in the gtk-java-2-6 branch.
Comment 3 Igor Foox 2005-07-15 17:16:26 UTC
Created attachment 49254 [details] [review]
Patch for the 2-6 branch

Solves the problem for 2-6 branch by changing != null to ! ... .isNull().
Comment 4 Igor Foox 2005-07-15 17:17:33 UTC
Created attachment 49255 [details]
A more sophisticated test case

This test case checks if a mark doesn't exist, then adds it, and checks that it
exists.
Comment 5 Ismael Juma 2005-07-15 17:22:26 UTC
Thanks for the patch. Committed to the gtk-java-2-6 branch.