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] Commented: (HARMONY-374) java.io.RandomAccessFile.seek(int pos) does not throw IOException if pos < 0
Date Tue, 18 Apr 2006 12:11:20 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-374?page=comments#action_12374917 ] 

Svetlana Samoilenko commented on HARMONY-374:
---------------------------------------------

Patch is coming

> 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
>  Attachments: RandomAccessFileTest.java
>
> Accodring to java 1.4.2 and 1.5 specifications for java java.io. RandomAccessFile.seek(int
pos)
> IOException must be thrown if pos<0. Harmony does not throw exception while RI (BEA
1.5)  does.
> 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");
>              rfl.seek(-1); 
>              System.out.println("FAIL: IOException must be thrown");           
>         } catch (IOException e) {
>              System.out.println("PASS");
>         }
>     }
> }
> Output on Harmony:
> FAIL: IOException must be thrown
> Output on BEA (1.5)
> PASS

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message