harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r395576 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/RandomAccessFile.java
Date Thu, 20 Apr 2006 12:46:47 GMT
Author: mloenko
Date: Thu Apr 20 05:46:47 2006
New Revision: 395576

URL: http://svn.apache.org/viewcvs?rev=395576&view=rev
Log:
fixes for HARMONY-374
java.io.RandomAccessFile.seek(int pos) does not throw IOException if pos < 0

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/RandomAccessFile.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/RandomAccessFile.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/RandomAccessFile.java?rev=395576&r1=395575&r2=395576&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/RandomAccessFile.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/RandomAccessFile.java
Thu Apr 20 05:46:47 2006
@@ -614,6 +614,9 @@
 	 *             occurs.
 	 */
 	public void seek(long pos) throws IOException {
+        if (pos < 0) {
+            throw new IOException("seek position is negative");
+        }
         openCheck();
         synchronized (repositionLock) {
             fileSystem.seek(fd.descriptor, pos, IFileSystem.SEEK_SET);



Mime
View raw message