Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-6111

[classlib] [luni] java.io.BufferedInputStream.reset() throws IOException after skipping the marked position

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 5.0M8
    • 5.0M9
    • Classlib
    • None
    • Moderate

    Description

      Given a test case [1].
      If SKIP_VALUE<=5, all of HDK and HY6VM25+ and RI pass the test;
      else both HDK and HY6VM25+ throw IOException [2] but RI also passes this.

      [1] Test Case:
      public void test_skipJ() throws IOException

      { byte[] input = "12345678900".getBytes(); BufferedInputStream buffis = new BufferedInputStream( new ByteArrayInputStream(input)); buffis.mark(5); buffis.skip(SKIP_VALUE); buffis.reset(); }

      [2] java.io.IOException: Mark has been invalidated.
      at java.io.BufferedInputStream.reset(BufferedInputStream.java:324)

      Attachments

        Activity

          People

            Unassigned Unassigned
            zhoukevin Kevin Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified