Merge pull request #106 from bgrozev/fix-102

fix: Fixes #102 (inexact port range validation).
This commit is contained in:
bbaldino 2017-03-29 12:10:24 -07:00 committed by GitHub
commit 47acf238bf

View File

@ -692,11 +692,11 @@ public class NetworkUtils
* @param port the port number that we'd like verified.
*
* @return <tt>true</tt> if port is a valid and bindable port number and
* <tt>alse</tt> otherwise.
* <tt>false</tt> otherwise.
*/
public static boolean isValidPortNumber(int port)
{
return MIN_PORT_NUMBER < port && port < MAX_PORT_NUMBER;
return MIN_PORT_NUMBER <= port && port <= MAX_PORT_NUMBER;
}
/**