1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 01:45:33 +02:00
cdt/core
Andrew Eidsness 8883fb1af5 Bug 402177: Btree.insert returns wrong value
The javadoc for BTree.insert says "don't insert if the key was already
there, in which case we return the record that matched".

However, the implementation was returning the new record even when it
was not actually inserted.

This is a fix for the problem and a test case to demonstrate the issue.

Further Changes:
----------------
I have modified the code style as described in the comments in
https://git.eclipse.org/r/#/c/10804.

However, I'm still not sure what style is expected.  I've looked through
the CDT wiki a few times, especially the 'new developer' parts, but
haven't found anything relevant.  When I asked the question a few weeks
ago, the only reply was to use the "eclipse built-in style", which I
can't find in my preferences.  The default seems to be "K&R Style" (that
is what it is set to now, and I don't think that I would have changed
it), so that is what I've used here.

If I've missed the section in the wiki then a pointer would be greatly
appreciated.  Otherwise this topic would be a great topic for someone
that knows the answers to add to the wiki.

Change-Id: If079f235871fcdfbd35f1cba3f64cc3e33edaaec
Reviewed-on: https://git.eclipse.org/r/10804
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2013-03-12 12:24:05 -04:00
..
org.eclipse.cdt.alltests Revert "Revert "Allow unreliable tests to be avoided"" 2012-08-24 11:35:59 -07:00
org.eclipse.cdt.core Bug 402177: Btree.insert returns wrong value 2013-03-12 12:24:05 -04:00
org.eclipse.cdt.core.aix Bug 393455 - Terminal sessions broken on AIX 2013-01-15 10:35:06 -05:00
org.eclipse.cdt.core.linux Remove fragment jars. Add missing property files. (Cherry picked 8_0) 2012-10-13 18:25:17 -04:00
org.eclipse.cdt.core.linux.ia64 Bumped up feature versions for Kepler. 2012-06-28 11:08:11 -07:00
org.eclipse.cdt.core.linux.ppc Bumped up feature versions for Kepler. 2012-06-28 11:08:11 -07:00
org.eclipse.cdt.core.linux.ppc64 Bumped up feature versions for Kepler. 2012-06-28 11:08:11 -07:00
org.eclipse.cdt.core.linux.x86 Bumped up feature versions for Kepler. 2012-06-28 11:08:11 -07:00
org.eclipse.cdt.core.linux.x86_64 Bumped up feature versions for Kepler. 2012-06-28 11:08:11 -07:00
org.eclipse.cdt.core.macosx Remove fragment jars. Add missing property files. (Cherry picked 8_0) 2012-10-13 18:25:17 -04:00
org.eclipse.cdt.core.qnx Bug 314504 ProcessList leaks file descriptors during #getProcessList() 2010-05-27 10:01:52 +00:00
org.eclipse.cdt.core.solaris Remove fragment jars. Add missing property files. (Cherry picked 8_0) 2012-10-13 18:25:17 -04:00
org.eclipse.cdt.core.tests Bug 402177: Btree.insert returns wrong value 2013-03-12 12:24:05 -04:00
org.eclipse.cdt.core.win32 Remove fragment jars. Add missing property files. (Cherry picked 8_0) 2012-10-13 18:25:17 -04:00
org.eclipse.cdt.core.win32.x86 Bumped up feature versions for Kepler. 2012-06-28 11:08:11 -07:00
org.eclipse.cdt.core.win32.x86_64 Bumped up feature versions for Kepler. 2012-06-28 11:08:11 -07:00
org.eclipse.cdt.ui Bug 393883 - Implement Method loses throw() 2013-03-11 15:44:53 -04:00
org.eclipse.cdt.ui.tests Bug 393883 - Implement Method loses throw() 2013-03-11 15:44:53 -04:00