Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4063511

java.io.LineNumberReader class get wrong lineNumber while skip out of file

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2beta3
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Description

      When I use java.io.LineNumberReader class, I found that if I skip out of the file I got the wrong Line Number of the file. When I browse the souce file (java/io/LineNumberReader.java jdk1.1.3 & jdk1.1.1) I found that at line 117, method public int read(char cbuf[],int off,int len) throws ...:the method call super class to read chars, and get the number of bytes read to variable n. but when this culculate the lines, it use len instead of n. so when I skip off the file, n does not equals to len, the mistake then occur.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              zlisunw Zhenghua Li (Inactive)
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: