MarcoGervasoni / gwt-math

Automatically exported from code.google.com/p/gwt-math
0 stars 0 forks source link

BigInteger/BigDecimal should implement Comparable #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

I have a helper function in my ObjectUtils class:
public static <T> int compareTo(Comparable<T> c1, T c2) {
...
}
I want to use it in my code like this:
BigDecimal bigDecimalOne = ...
BigDecimal bigDecimalTwo= ...
ObjectUtils.<BigDecimal>compareTo(bigDecimalOne, bigDecimalTwo);

What is the expected output? What do you see instead?
This should be possible to use. Instead I see errors in the GWT log like:

[ERROR] Line 206: The parameterized method
<BigDecimal>compareTo(Comparable<BigDecimal>, BigDecimal) of type
ObjectUtils is not applicable for the arguments (BigDecimal, BigDecimal)

What version of the product are you using? On what operating system?
GWT-Math 2.0.3
OS: Windows XP in hosted modus

Original issue reported on code.google.com by holger.b...@googlemail.com on 6 Mar 2009 at 11:15

GoogleCodeExporter commented 9 years ago
patch is attached

Original comment by ruslan.s...@gmail.com on 19 Jul 2009 at 5:55

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by ruslan.s...@gmail.com on 19 Jul 2009 at 6:30

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in 2.1

Original comment by marco.ge...@gmail.com on 6 Aug 2009 at 9:47