mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 04:55:22 +02:00
[235577] [dstore][launcher] Number 0 is accepted as valid port number
This commit is contained in:
parent
9afbd5020f
commit
9bbc6bb137
1 changed files with 14 additions and 0 deletions
|
@ -13,6 +13,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [226364][api][breaking] RemoteBaseServerLauncherForm should not implement RemoteServerLauncherConstants.
|
* Martin Oberhuber (Wind River) - [226364][api][breaking] RemoteBaseServerLauncherForm should not implement RemoteServerLauncherConstants.
|
||||||
|
* David McKnight (IBM) - [235577] [dstore][launcher] Number 0 is accepted as valid port number
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.ui.widgets;
|
package org.eclipse.rse.ui.widgets;
|
||||||
|
@ -302,8 +303,14 @@ public class RemoteServerLauncherForm extends RemoteBaseServerLauncherForm
|
||||||
if (launchType == ServerLaunchType.REXEC_LITERAL)
|
if (launchType == ServerLaunchType.REXEC_LITERAL)
|
||||||
{
|
{
|
||||||
String port = getREXECPort();
|
String port = getREXECPort();
|
||||||
|
int portAsInt = Integer.parseInt(port);
|
||||||
|
|
||||||
msg = _rexecPortValidator.validate(port);
|
msg = _rexecPortValidator.validate(port);
|
||||||
|
|
||||||
|
// for daemons we don't allow 0
|
||||||
|
if (msg == null && portAsInt == 0)
|
||||||
|
msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_NOTVALID);
|
||||||
|
|
||||||
if (msg == null)
|
if (msg == null)
|
||||||
{
|
{
|
||||||
String path = getServerInstallPath();
|
String path = getServerInstallPath();
|
||||||
|
@ -330,8 +337,15 @@ public class RemoteServerLauncherForm extends RemoteBaseServerLauncherForm
|
||||||
else if (launchType == ServerLaunchType.DAEMON_LITERAL)
|
else if (launchType == ServerLaunchType.DAEMON_LITERAL)
|
||||||
{
|
{
|
||||||
String port = getDaemonPort();
|
String port = getDaemonPort();
|
||||||
|
|
||||||
|
int portAsInt = Integer.parseInt(port);
|
||||||
msg = _daemonPortValidator.validate(port);
|
msg = _daemonPortValidator.validate(port);
|
||||||
|
|
||||||
|
// for daemons we don't allow 0
|
||||||
|
if (msg == null && portAsInt == 0)
|
||||||
|
msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_NOTVALID);
|
||||||
|
|
||||||
|
|
||||||
if (msg == null)
|
if (msg == null)
|
||||||
{
|
{
|
||||||
_msgLine.clearErrorMessage();
|
_msgLine.clearErrorMessage();
|
||||||
|
|
Loading…
Add table
Reference in a new issue