-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
beta2
-
generic
-
generic
Name: mlR10151 Date: 04/10/2001
According to the spec.
public void seek(long pos) throws IOException
. . .
Throws:
IndexOutOfBoundsException - if pos is smaller the the flushed position.
^^^ typo copied from the spec.
But it does not throw any exception:
===================== a.java =======================
import java.io.*;
import javax.imageio.stream.*;
public class a {
public static void main (String argv[]) throws Exception {
File f = new File("a.java");
FileImageInputStream fiis = new FileImageInputStream(f);
fiis.flushBefore(2);
try {
fiis.seek(0);
System.out.println("Failed");
} catch (IndexOutOfBoundsException e) {
System.out.println("Passed");
}
}
}
===================== log =======================
% java -version
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b59)
Java HotSpot(TM) Client VM (build 1.4.0-beta-b59, mixed mode)
% java a
Failed
This bug causes failure of the new JCK test
api/javax_imageio/stream/FileImageInputStream/index.html#seek
======================================================================
- duplicates
-
JDK-4441334 FileImageInputStream.seek(long) does not make proper checkings
- Closed