GNOME Bugzilla – Bug 309543
TextBuffer.markExists() always returns true
Last modified: 2009-08-15 18:40: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.
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).
Works with HEAD. So the problem is just in the gtk-java-2-6 branch.
Created attachment 49254 [details] [review] Patch for the 2-6 branch Solves the problem for 2-6 branch by changing != null to ! ... .isNull().
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.
Thanks for the patch. Committed to the gtk-java-2-6 branch.