diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | java/text/CollationElementIterator.java | 18 |
2 files changed, 18 insertions, 10 deletions
@@ -1,8 +1,16 @@ +2003-01-25 C. Brian Jones <cbj@gnu.org> + + * java/text/CollationElementIterator.java (secondaryOrder): return + value is supposed to be a short instead of an int; merged with gcj + (tertiaryOrder): ditto + (primaryOrder): merged with gcj + 2003-01-25 Stephen Crawley <crawley@dstc.edu.au> * java/math/BigDecimal.java (BigDecimal): enhance parsing of exponents (toString): do not return Strings starting with . and - erroneously. - Improves Mauve results to 12 of 600 instead of 16 of 338 on DiagBigDecimal. + Improves Mauve results to 12 of 600 instead of 16 of 338 on + DiagBigDecimal. 2003-01-25 C. Brian Jones <cbj@gnu.org> diff --git a/java/text/CollationElementIterator.java b/java/text/CollationElementIterator.java index d528d92a1..75c24a2ca 100644 --- a/java/text/CollationElementIterator.java +++ b/java/text/CollationElementIterator.java @@ -96,10 +96,10 @@ private int pos; * * @return The primary order value of the specified collation value. This is the high 16 bits. */ -public static final int -primaryOrder(int value) +public static final int primaryOrder (int order) { - return((int)((value & 0xFFFF0000L) >> 16)); + // From the JDK 1.2 spec. + return order >>> 16; } /*************************************************************************/ @@ -112,10 +112,10 @@ primaryOrder(int value) * * @return The secondary order value of the specified collation value. This is the bits 8-15. */ -public static final int -secondaryOrder(int value) +public static final short secondaryOrder (int order) { - return((value & 0xFF00) >> 8); + // From the JDK 1.2 spec. + return (short) ((order >>> 8) & 255); } /*************************************************************************/ @@ -128,10 +128,10 @@ secondaryOrder(int value) * * @return The tertiary order value of the specified collation value. This is the low eight bits. */ -public static final int -tertiaryOrder(int value) +public static final short tertiaryOrder (int order) { - return(value & 0xFF); + // From the JDK 1.2 spec. + return (short) (order & 255); } /*************************************************************************/ |