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

Wrong exception catch for FTPClient in JDK-8055032

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 9
    • 9
    • core-libs
    • b33
    • b114

    Description

      Code changed in b33 :-
      src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java

      else {
                       try {
      - code = Integer.parseInt(response.substring(0, 3));
      + code = Integer.parseInt(response, 0, 3, 10);
                       } catch (NumberFormatException e) {
                           code = -1;
                       } catch (StringIndexOutOfBoundsException e) {

      With this change the catch should be IndexOutOfBoundsException in place of StringIndexOutOfBoundsException

      Attachments

        Issue Links

          Activity

            People

              vtewari Vyom Tewari
              vtewari Vyom Tewari
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: