This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: CollationElementIterator buglet


I'm checking this in.
This fixes a simple bug in CollationElementIterator.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* java/text/CollationElementIterator.java (secondaryOrder): Cast
	result to `short'.
	(tertiaryOrder): Likewise.

Index: java/text/CollationElementIterator.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/text/CollationElementIterator.java,v
retrieving revision 1.4
diff -u -r1.4 CollationElementIterator.java
--- java/text/CollationElementIterator.java 2000/03/07 19:55:27 1.4
+++ java/text/CollationElementIterator.java 2001/12/18 17:15:50
@@ -1,6 +1,6 @@
 // CollationElementIterator.java - Iterate over decomposed characters.
 
-/* Copyright (C) 1999  Free Software Foundation
+/* Copyright (C) 1999, 2001  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -45,13 +45,13 @@
   public static final short secondaryOrder (int order)
   {
     // From the JDK 1.2 spec.
-    return (order >>> 8) & 255;
+    return (short) ((order >>> 8) & 255);
   }
 
   public static final short tertiaryOrder (int order)
   {
     // From the JDK 1.2 spec.
-    return order & 255;
+    return (short) (order & 255);
   }
 
   // Non-public constructor.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]