harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r429044 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java
Date Sat, 05 Aug 2006 20:48:07 GMT
Author: ndbeyer
Date: Sat Aug  5 13:48:06 2006
New Revision: 429044

URL: http://svn.apache.org/viewvc?rev=429044&view=rev
Log:
Apply patch for HARMONY-1033: [classlib][lang]compatibility: expected IndexOutOfBoundsException
for Character.codePointAt

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java?rev=429044&r1=429043&r2=429044&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java
Sat Aug  5 13:48:06 2006
@@ -1914,11 +1914,9 @@
      * @since 1.5
      */
     public static int codePointAt(char[] seq, int index, int limit) {
-        if (seq == null)
-            throw new NullPointerException();
-        int len = seq.length;
-        if (index < 0 || index >= limit || limit < 0 || limit > len)
-            throw new IndexOutOfBoundsException();
+        if (index < 0 || index >= limit || limit < 0 || limit > seq.length) {
+        	throw new IndexOutOfBoundsException();
+        }    	
 
         char high = seq[index++];
         if (index >= limit)



Mime
View raw message