JDK-6437371 : (coll) TreeMap.buildFromSorted midpoint calculation
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:collections
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-06-12
  • Updated: 2012-10-08
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b03Fixed
Related Reports
Relates :  
Description
Doug Lea writes:

"""
It just occurred to me that there is another binary-search-like indexing
overflow error, in TreeMap.java line 2357:
        int mid = (lo + hi) / 2;
ought to be
        int mid = (lo + hi) >>> 1;
"""

Comments
EVALUATION Doug Lea is providing a fix.
12-06-2006