harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Svetlana Samoilenko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-374) java.io.RandomAccessFile.seek(int pos) does not throw IOException if pos < 0
Date Tue, 18 Apr 2006 11:42:17 GMT
java.io.RandomAccessFile.seek(int pos) does not  throw IOException if pos < 0

         Key: HARMONY-374
         URL: http://issues.apache.org/jira/browse/HARMONY-374
     Project: Harmony
        Type: Bug

  Components: Classlib  
    Reporter: Svetlana Samoilenko

Accodring to java 1.4.2 and 1.5 specifications for java java.io. RandomAccessFile.seek(int
IOException must be thrown if pos<0. Harmony does not throw exception while RI (BEA 1.5)

Code to reproduce:
import java.io.File;
import java.io.RandomAccessFile;
import java.io.IOException;

public class test {

  public static void main(String[] args) {
        try {            
             File file=File.createTempFile("one",null);
             RandomAccessFile rfl= new RandomAccessFile(file,"r");
             System.out.println("FAIL: IOException must be thrown");           
        } catch (IOException e) {
Output on Harmony:
FAIL: IOException must be thrown

Output on BEA (1.5)

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message