-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b33
-
b114
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
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
- relates to
-
JDK-8055032 Improve numerical parsing in java.net and sun.net
- Resolved