harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r772257 - in /harmony/enhanced/classlib/trunk/modules/luni/src: main/java/java/io/BufferedInputStream.java test/api/common/org/apache/harmony/luni/tests/java/io/BufferedInputStreamTest.java
Date Wed, 06 May 2009 13:43:54 GMT
Author: tellison
Date: Wed May  6 13:43:53 2009
New Revision: 772257

URL: http://svn.apache.org/viewvc?rev=772257&view=rev
Log:
Apply patch for HARMONY-6134 ([classlib][luni] java.io.BufferedInputStream.reset() throws
IOException after skipping the marked position)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/BufferedInputStream.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedInputStreamTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/BufferedInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/BufferedInputStream.java?rev=772257&r1=772256&r2=772257&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/BufferedInputStream.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/BufferedInputStream.java
Wed May  6 13:43:53 2009
@@ -416,7 +416,6 @@
                 pos = count;
                 return read;
             }
-            markpos = -1;
         }
         return read + localIn.skip(amount - read);
     }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedInputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedInputStreamTest.java?rev=772257&r1=772256&r2=772257&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedInputStreamTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedInputStreamTest.java
Wed May  6 13:43:53 2009
@@ -429,6 +429,31 @@
     }
 
     /**
+     * @tests java.io.BufferedInputStream#reset()
+     */
+    public void test_reset_scenario1() throws IOException {
+        byte[] input = "12345678900".getBytes();
+        BufferedInputStream buffis = new BufferedInputStream(
+                new ByteArrayInputStream(input));
+        buffis.read();
+        buffis.mark(5);
+        buffis.skip(5);
+        buffis.reset();
+    }
+
+    /**
+     * @tests java.io.BufferedInputStream#reset()
+     */
+    public void test_reset_scenario2() throws IOException {
+        byte[] input = "12345678900".getBytes();
+        BufferedInputStream buffis = new BufferedInputStream(
+                new ByteArrayInputStream(input));
+        buffis.mark(5);
+        buffis.skip(6);
+        buffis.reset();
+    }
+
+    /**
      * @tests java.io.BufferedInputStream#skip(long)
      */
     public void test_skipJ() throws IOException {



Mime
View raw message