Harmony
  1. Harmony
  2. HARMONY-6290

BufferedReader.readLine() breaks at EBCDIC newline, violating the spec

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0M11
    • Component/s: Classlib
    • Labels:
      None
    • Environment:
      SVN Revision: 800827
    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Moderate

      Description

      The spec says that BufferedReader.readLine() considers only "\r", "\n" and "\r\n" to be line separators. We must not permit additional separator characters. I admit that the RI's behaviour is surprising, and incompatible with it's own Pattern and Scanner classes. But this is the specified behaviour; the doc explicitly calls out which character sequences are used as newlines. It does not permit additional characters to break lines.

      For users reading EBCDIC-encoded files, a better practice is to read through the files using a Scanner. That way, the application will behave the same when executed on either Harmony or on the RI.

      #Android

        Activity

        Jesse Wilson created issue -
        Jesse Wilson made changes -
        Field Original Value New Value
        Attachment readLine_no_EBCDIC.patch [ 12415508 ]
        Oliver Deakin made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Oliver Deakin [ odeakin ]
        Fix Version/s 5.0M11 [ 12314031 ]
        Resolution Fixed [ 1 ]
        Oliver Deakin made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Oliver Deakin
            Reporter:
            Jesse Wilson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 20m
              20m
              Remaining:
              Remaining Estimate - 20m
              20m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development