1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Fix for bug 75627: Incorrect limit to port numbers.

This commit is contained in:
Mikhail Khodjaiants 2004-11-11 21:28:40 +00:00
parent d0408df257
commit 66b367c79f
2 changed files with 6 additions and 4 deletions

View file

@ -1,3 +1,7 @@
2004-11-11 Mikhail Khodjaiants
Fix for bug 75627: Incorrect limit to port numbers.
* TCPSettingsBlock.java
2004-11-08 Mikhail Khodjaiants
Added the "Automatically refresh registers" and "Automatically refresh shared libraries"
preferences and properties.

View file

@ -188,13 +188,11 @@ public class TCPSettingsBlock extends Observable {
private boolean portNumberIsValid( String portNumber ) {
try {
int port = Short.parseShort( portNumber );
if ( port < 0 )
return false;
int port = Integer.parseInt( portNumber );
return ( port > 0 && port <= 0xFFFF );
}
catch( NumberFormatException e ) {
return false;
}
return true;
}
}