Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 41766 invoked from network); 17 Aug 2006 18:48:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Aug 2006 18:48:47 -0000 Received: (qmail 72958 invoked by uid 500); 17 Aug 2006 18:48:47 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 72858 invoked by uid 500); 17 Aug 2006 18:48:47 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 72841 invoked by uid 99); 17 Aug 2006 18:48:47 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Aug 2006 11:48:46 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C7B427142A7 for ; Thu, 17 Aug 2006 18:45:14 +0000 (GMT) Message-ID: <23040773.1155840314815.JavaMail.jira@brutus> Date: Thu, 17 Aug 2006 11:45:14 -0700 (PDT) From: "Tim Ellison (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Resolved: (HARMONY-1104) [classlib][io]Harmony does not throw IOException for java.io.FileInputStream.skip(Long n) when n<0 while RI does. In-Reply-To: <3520824.1155037874912.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ 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