You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by nd...@apache.org on 2006/08/05 22:48:07 UTC

svn commit: r429044 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java

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)