fix: Fixes #102 (inexact port range validation).
This commit is contained in:
parent
77fe6973c4
commit
9348af1624
@ -692,11 +692,11 @@ public class NetworkUtils
|
|||||||
* @param port the port number that we'd like verified.
|
* @param port the port number that we'd like verified.
|
||||||
*
|
*
|
||||||
* @return <tt>true</tt> if port is a valid and bindable port number and
|
* @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)
|
public static boolean isValidPortNumber(int port)
|
||||||
{
|
{
|
||||||
return MIN_PORT_NUMBER < port && port < MAX_PORT_NUMBER;
|
return MIN_PORT_NUMBER <= port && port <= MAX_PORT_NUMBER;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user