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

No exception thrown for FTP pending reply error.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • core-libs
    • beta
    • generic
    • generic



      Name: stC104175 Date: 05/16/2000


      java version "1.1.5"

      java version "1.1.6"

      java version "1.2.2"
      Classic VM (build JDK-1.2.2-001, native threads, symcjit)

      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)


      When performing an FTP download, e.g. by opening a connection using an FTP URL,
      and the FTP server does not immediately return an error but does after the
      download, no exception is thrown. Instead the cryptic message "Error reading FTP
      pending reply" is printed to the console.

      Highly edited Java source snippet:
      InputStream i = (new
      URL("ftp://somewhere.com/somefile")).openConnection().getInputStream();
      while (i.read() >= 0);
      i.close();

      As far as I can determine with JDK 1.2.2 javap, there are two problems:
      1. sun.net.ftp.FtpClient doesn't throw an execption when a error is pending
      2. sun.net.ftp.FtpInputStream.close() catches exceptions.
      (Review ID: 104928)
      ======================================================================

            jccollet Jean-Christophe Collet (Inactive)
            stompkinsunw Sean Tompkins (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: