db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r527830 - /db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/ArrayInputStream.java
Date Thu, 12 Apr 2007 08:19:15 GMT
Author: kahatlen
Date: Thu Apr 12 01:19:14 2007
New Revision: 527830

URL: http://svn.apache.org/viewvc?view=rev&rev=527830
Log:
DERBY-2118: Make ArrayInputStream.setLimit(int,int) void

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/ArrayInputStream.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/ArrayInputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/ArrayInputStream.java?view=diff&rev=527830&r1=527829&r2=527830
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/ArrayInputStream.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/ArrayInputStream.java
Thu Apr 12 01:19:14 2007
@@ -160,24 +160,16 @@
 
 		@exception IOException limit is out of range 
 	*/
-	public int setLimit(int offset, int length) throws IOException {
-
-		if ((offset < 0) || (length < 0)) {
-			start = end = position = 0;
-			throw new EOFException();
-		}
+	public void setLimit(int offset, int length) throws IOException {
 
 		start = offset;
 		end = offset + length;
+		position = start;
 
-		if (end > pageData.length) {
+		if ((offset < 0) || (length < 0) || (end > pageData.length)) {
 			start = end = position = 0;
 			throw new EOFException();
 		}
-
-		position = start;
-
-		return length;
 	}
 
 	/*
@@ -189,12 +181,7 @@
         start = position;
         end   = position + length;
 
-        if (end <= pageData.length)
-        {
-            return;
-        }
-        else
-        {
+        if (end > pageData.length) {
 			start = end = position = 0;
 			throw new EOFException();
         }



Mime
View raw message