Commit d33c0ebf authored by Stephane Nicoll's avatar Stephane Nicoll Committed by Phillip Webb

Fix data type of telnet and ssh ports

Define shell.ssh.port and shell.telnet.port as integer properties
so that the generated meta-data exposes the proper type.

Fixes gh-2076
parent 27d9d7fd
...@@ -236,12 +236,12 @@ public class ShellProperties { ...@@ -236,12 +236,12 @@ public class ShellProperties {
/** /**
* SSH port. * SSH port.
*/ */
private String port = "2000"; private Integer port = 2000;
@Override @Override
protected void applyToCrshShellConfig(Properties config) { protected void applyToCrshShellConfig(Properties config) {
if (this.enabled) { if (this.enabled) {
config.put("crash.ssh.port", this.port); config.put("crash.ssh.port", String.valueOf(this.port));
if (this.keyPath != null) { if (this.keyPath != null) {
config.put("crash.ssh.keypath", this.keyPath); config.put("crash.ssh.keypath", this.keyPath);
} }
...@@ -267,10 +267,10 @@ public class ShellProperties { ...@@ -267,10 +267,10 @@ public class ShellProperties {
public void setPort(Integer port) { public void setPort(Integer port) {
Assert.notNull(port, "port must not be null"); Assert.notNull(port, "port must not be null");
this.port = port.toString(); this.port = port;
} }
public String getPort() { public Integer getPort() {
return this.port; return this.port;
} }
...@@ -291,12 +291,12 @@ public class ShellProperties { ...@@ -291,12 +291,12 @@ public class ShellProperties {
/** /**
* Telnet port. * Telnet port.
*/ */
private String port = "5000"; private Integer port = 5000;
@Override @Override
protected void applyToCrshShellConfig(Properties config) { protected void applyToCrshShellConfig(Properties config) {
if (this.enabled) { if (this.enabled) {
config.put("crash.telnet.port", this.port); config.put("crash.telnet.port", String.valueOf(this.port));
} }
} }
...@@ -310,10 +310,10 @@ public class ShellProperties { ...@@ -310,10 +310,10 @@ public class ShellProperties {
public void setPort(Integer port) { public void setPort(Integer port) {
Assert.notNull(port, "port must not be null"); Assert.notNull(port, "port must not be null");
this.port = port.toString(); this.port = port;
} }
public String getPort() { public Integer getPort() {
return this.port; return this.port;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment