DocImpl.readHTMLDocumentation assumes available() is all there is

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 6
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: