JDK-4899706 : BigInteger should implement generified Comparable
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.math
  • Affected Version: 5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2003-08-01
  • Updated: 2017-05-16
  • Resolved: 2003-08-30
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.
Other
5.0 tigerFixed
Related Reports
Relates :  
Relates :  
Description
With the introduction of generics, BigInteger should implement the new generified form of the Comparable interface.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b18
14-06-2004

SUGGESTED FIX src/share/classes/java/math>sccs sccsdiff -r1.60 -r1.61 BigInteger.java ------- BigInteger.java ------- 80c80 < public class BigInteger extends Number implements Comparable { --- > public class BigInteger extends Number implements Comparable<BigInteger> { 2502,2520d2501 < /** < * Compares this BigInteger with the specified Object. If the Object is a < * BigInteger, this method behaves like <tt>compareTo(BigInteger)</tt>. < * Otherwise, it throws a <tt>ClassCastException</tt> (as BigIntegers are < * comparable only to other BigIntegers). < * < * @param o Object to which this BigInteger is to be compared. < * @return a negative number, zero, or a positive number as this < * BigInteger is numerically less than, equal to, or greater < * than <tt>o</tt>, which must be a BigInteger. < * @throws ClassCastException <tt>o</tt> is not a BigInteger. < * @see #compareTo(java.math.BigInteger) < * @see Comparable < * @since 1.2 < */ < public int compareTo(Object o) { < return compareTo((BigInteger)o); < } < ###@###.### 2003-08-15
15-08-2003

EVALUATION A fine idea. ###@###.### 2003-07-31
31-07-2003