You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ilya Okomin (JIRA)" <ji...@apache.org> on 2006/08/08 13:51:14 UTC
[jira] Created: (HARMONY-1104) [classlib][io]Harmony does not
throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while
RI does.
[classlib][io]Harmony does not throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while RI does.
------------------------------------------------------------------------------------------------------------------
Key: HARMONY-1104
URL: http://issues.apache.org/jira/browse/HARMONY-1104
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Ilya Okomin
Priority: Trivial
Attachments: FileInputStream.patch, FileInputStreamTest.patch
Harmony does not throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while RI does.
Java 1.5.0. spec says:
"Throws: IOException - if n is negative, or if an I/O error occurs.".
============== test.java =====================
import java.io.FileInputStream;
import java.io.File;
import java.io.IOException;
public class test {
public static void run_test() throws IOException{
File localFile = File.createTempFile("aaaa", "bbbb");
localFile.deleteOnExit();
FileInputStream fis = new FileInputStream(localFile);
try {
long res = fis.skip(-5);
System.out.println("fail: IOException must be thrown if number of bytes to skip <0");
System.out.println("skip = " + res);
return;
} catch (IOException e) {
// Expected IOException
} catch (Exception e) {
System.out.println("IOException expected, but found: " + e.getMessage());
return;
}
System.out.println("Test passed!");
fis.close();
}
public static void main(String[] args) {
try{
run_test();
} catch (Exception e) {
e.printStackTrace();
}
}
}
==========================================
Output:
Harmony:
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r424571, (Jul 22 2006), Windows/ia32/msvc 1310, release build
http://incubator.apache.org/harmony
fail: IOException must be thrown if number of bytes to skip <0
skip = 9223372036854775803
RI:
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
Test passed!
Suggested fix and regression test to it could be found in attach.
--
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
[jira] Assigned: (HARMONY-1104) [classlib][io]Harmony does not
throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while
RI does.
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1104?page=all ]
Tim Ellison reassigned HARMONY-1104:
------------------------------------
Assignee: Tim Ellison
> [classlib][io]Harmony does not throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while RI does.
> ------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1104
> URL: http://issues.apache.org/jira/browse/HARMONY-1104
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Assigned To: Tim Ellison
> Priority: Trivial
> Attachments: FileInputStream.patch, FileInputStream.patch, FileInputStreamTest.patch, FileInputStreamTest.patch
>
>
> Harmony does not throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while RI does.
> Java 1.5.0. spec says:
> "Throws: IOException - if n is negative, or if an I/O error occurs.".
> ============== test.java =====================
> import java.io.FileInputStream;
> import java.io.File;
> import java.io.IOException;
> public class test {
> public static void run_test() throws IOException{
> File localFile = File.createTempFile("aaaa", "bbbb");
> localFile.deleteOnExit();
> FileInputStream fis = new FileInputStream(localFile);
> try {
> long res = fis.skip(-5);
> System.out.println("fail: IOException must be thrown if number of bytes to skip <0");
> System.out.println("skip = " + res);
> return;
> } catch (IOException e) {
> // Expected IOException
> } catch (Exception e) {
> System.out.println("IOException expected, but found: " + e.getMessage());
> return;
> }
> System.out.println("Test passed!");
> fis.close();
> }
> public static void main(String[] args) {
> try{
> run_test();
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
> ==========================================
> Output:
> Harmony:
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r424571, (Jul 22 2006), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> fail: IOException must be thrown if number of bytes to skip <0
> skip = 9223372036854775803
> RI:
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
> Test passed!
> Suggested fix and regression test to it could be found in attach.
--
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
[jira] Closed: (HARMONY-1104) [classlib][io]Harmony does not throw
IOException for java.io.FileInputStream.skip(Long n) when n<0 while RI
does.
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1104?page=all ]
Tim Ellison closed HARMONY-1104.
--------------------------------
Verified by Ilya.
> [classlib][io]Harmony does not throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while RI does.
> ------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1104
> URL: http://issues.apache.org/jira/browse/HARMONY-1104
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Assigned To: Tim Ellison
> Priority: Trivial
> Attachments: FileInputStream.patch, FileInputStream.patch, FileInputStreamTest.patch, FileInputStreamTest.patch
>
>
> Harmony does not throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while RI does.
> Java 1.5.0. spec says:
> "Throws: IOException - if n is negative, or if an I/O error occurs.".
> ============== test.java =====================
> import java.io.FileInputStream;
> import java.io.File;
> import java.io.IOException;
> public class test {
> public static void run_test() throws IOException{
> File localFile = File.createTempFile("aaaa", "bbbb");
> localFile.deleteOnExit();
> FileInputStream fis = new FileInputStream(localFile);
> try {
> long res = fis.skip(-5);
> System.out.println("fail: IOException must be thrown if number of bytes to skip <0");
> System.out.println("skip = " + res);
> return;
> } catch (IOException e) {
> // Expected IOException
> } catch (Exception e) {
> System.out.println("IOException expected, but found: " + e.getMessage());
> return;
> }
> System.out.println("Test passed!");
> fis.close();
> }
> public static void main(String[] args) {
> try{
> run_test();
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
> ==========================================
> Output:
> Harmony:
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r424571, (Jul 22 2006), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> fail: IOException must be thrown if number of bytes to skip <0
> skip = 9223372036854775803
> RI:
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
> Test passed!
> Suggested fix and regression test to it could be found in attach.
--
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
[jira] Commented: (HARMONY-1104) [classlib][io]Harmony does not
throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while
RI does.
Posted by "Ilya Okomin (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1104?page=comments#action_12429987 ]
Ilya Okomin commented on HARMONY-1104:
--------------------------------------
I've checked changes - ok, unit tests are also ok for FileInputStream class.
> [classlib][io]Harmony does not throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while RI does.
> ------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1104
> URL: http://issues.apache.org/jira/browse/HARMONY-1104
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Assigned To: Tim Ellison
> Priority: Trivial
> Attachments: FileInputStream.patch, FileInputStream.patch, FileInputStreamTest.patch, FileInputStreamTest.patch
>
>
> Harmony does not throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while RI does.
> Java 1.5.0. spec says:
> "Throws: IOException - if n is negative, or if an I/O error occurs.".
> ============== test.java =====================
> import java.io.FileInputStream;
> import java.io.File;
> import java.io.IOException;
> public class test {
> public static void run_test() throws IOException{
> File localFile = File.createTempFile("aaaa", "bbbb");
> localFile.deleteOnExit();
> FileInputStream fis = new FileInputStream(localFile);
> try {
> long res = fis.skip(-5);
> System.out.println("fail: IOException must be thrown if number of bytes to skip <0");
> System.out.println("skip = " + res);
> return;
> } catch (IOException e) {
> // Expected IOException
> } catch (Exception e) {
> System.out.println("IOException expected, but found: " + e.getMessage());
> return;
> }
> System.out.println("Test passed!");
> fis.close();
> }
> public static void main(String[] args) {
> try{
> run_test();
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
> ==========================================
> Output:
> Harmony:
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r424571, (Jul 22 2006), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> fail: IOException must be thrown if number of bytes to skip <0
> skip = 9223372036854775803
> RI:
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
> Test passed!
> Suggested fix and regression test to it could be found in attach.
--
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
[jira] Updated: (HARMONY-1104) [classlib][io]Harmony does not
throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while
RI does.
Posted by "Ilya Okomin (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1104?page=all ]
Ilya Okomin updated HARMONY-1104:
---------------------------------
Attachment: FileInputStream.patch
patch with granted license to ASF
> [classlib][io]Harmony does not throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while RI does.
> ------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1104
> URL: http://issues.apache.org/jira/browse/HARMONY-1104
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Priority: Trivial
> Attachments: FileInputStream.patch, FileInputStream.patch, FileInputStreamTest.patch
>
>
> Harmony does not throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while RI does.
> Java 1.5.0. spec says:
> "Throws: IOException - if n is negative, or if an I/O error occurs.".
> ============== test.java =====================
> import java.io.FileInputStream;
> import java.io.File;
> import java.io.IOException;
> public class test {
> public static void run_test() throws IOException{
> File localFile = File.createTempFile("aaaa", "bbbb");
> localFile.deleteOnExit();
> FileInputStream fis = new FileInputStream(localFile);
> try {
> long res = fis.skip(-5);
> System.out.println("fail: IOException must be thrown if number of bytes to skip <0");
> System.out.println("skip = " + res);
> return;
> } catch (IOException e) {
> // Expected IOException
> } catch (Exception e) {
> System.out.println("IOException expected, but found: " + e.getMessage());
> return;
> }
> System.out.println("Test passed!");
> fis.close();
> }
> public static void main(String[] args) {
> try{
> run_test();
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
> ==========================================
> Output:
> Harmony:
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r424571, (Jul 22 2006), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> fail: IOException must be thrown if number of bytes to skip <0
> skip = 9223372036854775803
> RI:
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
> Test passed!
> Suggested fix and regression test to it could be found in attach.
--
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
[jira] Updated: (HARMONY-1104) [classlib][io]Harmony does not
throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while
RI does.
Posted by "Ilya Okomin (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1104?page=all ]
Ilya Okomin updated HARMONY-1104:
---------------------------------
Attachment: FileInputStreamTest.patch
test patch with granted license to ASF
> [classlib][io]Harmony does not throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while RI does.
> ------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1104
> URL: http://issues.apache.org/jira/browse/HARMONY-1104
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Priority: Trivial
> Attachments: FileInputStream.patch, FileInputStream.patch, FileInputStreamTest.patch, FileInputStreamTest.patch
>
>
> Harmony does not throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while RI does.
> Java 1.5.0. spec says:
> "Throws: IOException - if n is negative, or if an I/O error occurs.".
> ============== test.java =====================
> import java.io.FileInputStream;
> import java.io.File;
> import java.io.IOException;
> public class test {
> public static void run_test() throws IOException{
> File localFile = File.createTempFile("aaaa", "bbbb");
> localFile.deleteOnExit();
> FileInputStream fis = new FileInputStream(localFile);
> try {
> long res = fis.skip(-5);
> System.out.println("fail: IOException must be thrown if number of bytes to skip <0");
> System.out.println("skip = " + res);
> return;
> } catch (IOException e) {
> // Expected IOException
> } catch (Exception e) {
> System.out.println("IOException expected, but found: " + e.getMessage());
> return;
> }
> System.out.println("Test passed!");
> fis.close();
> }
> public static void main(String[] args) {
> try{
> run_test();
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
> ==========================================
> Output:
> Harmony:
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r424571, (Jul 22 2006), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> fail: IOException must be thrown if number of bytes to skip <0
> skip = 9223372036854775803
> RI:
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
> Test passed!
> Suggested fix and regression test to it could be found in attach.
--
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
[jira] Resolved: (HARMONY-1104) [classlib][io]Harmony does not
throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while
RI does.
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1104?page=all ]
Tim Ellison resolved HARMONY-1104.
----------------------------------
Resolution: Fixed
Thanks Ilya.
Fixed in LUNI module at repo revision r432333.
Please check that this fully resolves the problem.
> [classlib][io]Harmony does not throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while RI does.
> ------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1104
> URL: http://issues.apache.org/jira/browse/HARMONY-1104
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Assigned To: Tim Ellison
> Priority: Trivial
> Attachments: FileInputStream.patch, FileInputStream.patch, FileInputStreamTest.patch, FileInputStreamTest.patch
>
>
> Harmony does not throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while RI does.
> Java 1.5.0. spec says:
> "Throws: IOException - if n is negative, or if an I/O error occurs.".
> ============== test.java =====================
> import java.io.FileInputStream;
> import java.io.File;
> import java.io.IOException;
> public class test {
> public static void run_test() throws IOException{
> File localFile = File.createTempFile("aaaa", "bbbb");
> localFile.deleteOnExit();
> FileInputStream fis = new FileInputStream(localFile);
> try {
> long res = fis.skip(-5);
> System.out.println("fail: IOException must be thrown if number of bytes to skip <0");
> System.out.println("skip = " + res);
> return;
> } catch (IOException e) {
> // Expected IOException
> } catch (Exception e) {
> System.out.println("IOException expected, but found: " + e.getMessage());
> return;
> }
> System.out.println("Test passed!");
> fis.close();
> }
> public static void main(String[] args) {
> try{
> run_test();
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
> ==========================================
> Output:
> Harmony:
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r424571, (Jul 22 2006), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> fail: IOException must be thrown if number of bytes to skip <0
> skip = 9223372036854775803
> RI:
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
> Test passed!
> Suggested fix and regression test to it could be found in attach.
--
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