harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r406815 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/String.java
Date Tue, 16 May 2006 03:53:56 GMT
Author: smishura
Date: Mon May 15 20:53:55 2006
New Revision: 406815

URL: http://svn.apache.org/viewcvs?rev=406815&view=rev
Log:
Removing redundant try-catch block from String(char[] data, int start, int length) constructor

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

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/String.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/String.java?rev=406815&r1=406814&r2=406815&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/String.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/String.java
Mon May 15 20:53:55 2006
@@ -434,11 +434,8 @@
 			offset = 0;
 			value = new char[length];
 			count = length;
-			try {
-				System.arraycopy(data, start, value, 0, count);
-			} catch (IndexOutOfBoundsException e) {
-				throw new StringIndexOutOfBoundsException();
-			}
+
+			System.arraycopy(data, start, value, 0, count);
 		} else
 			throw new StringIndexOutOfBoundsException();
 	}



Mime
View raw message