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

DocImpl.readHTMLDocumentation assumes available() is all there is

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 6
    • tools
    • None

      This code in src/share/classes/com/sun/tools/javadoc/DocImpl.java
      makes the classic mistake of assuming that available() will return
      the size of all the data that will ever be read.

          /**
           * Utility for subclasses which read HTML documentation files.
           */
          String readHTMLDocumentation(InputStream input, String filename) throws IOException {
              int filesize = input.available();
              byte[] filecontents = new byte[filesize];
              input.read(filecontents, 0, filesize);
              input.close();

      No actual user-visible bug is known.

            sseligmasunw Scott Seligman (Inactive)
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: