db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r584773 - /db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/ArrayInputStream.java
Date Mon, 15 Oct 2007 12:37:39 GMT
Author: kahatlen
Date: Mon Oct 15 05:37:39 2007
New Revision: 584773

URL: http://svn.apache.org/viewvc?rev=584773&view=rev
Log:
DERBY-3003: ArrayInputStream.skipBytes() may throw EOFException which
is disallowed by java.io.DataInput

Fix contributed by Jørgen Løland.

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?rev=584773&r1=584772&r2=584773&view=diff
==============================================================================
--- 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
Mon Oct 15 05:37:39 2007
@@ -220,8 +220,7 @@
 
     public final int skipBytes(int n) throws IOException {
 		if ((position + n) > end) {
-
-			throw new EOFException();
+            n = end - position;
 		}
 		position += n;
 		return n;



Mime
View raw message