Skip to content

Commit 2e76dd0

Browse files
committed
[java] Deleting redundant checks
1 parent f69fc04 commit 2e76dd0

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

java/server/src/org/openqa/grid/internal/cli/GridNodeCliOptions.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public GridNodeCliOptions parse(String[] args) {
4545
}
4646

4747
private IDefaultProvider defaults(String json) {
48-
Map<String, Object> map = (Map<String, Object>) new Json().toType(json, Map.class);
48+
Map<String, Object> map = new Json().toType(json, Map.class);
4949
map.remove("custom");
5050
map.remove("capabilities");
5151
map.remove("servlets");
@@ -219,12 +219,8 @@ public GridNodeConfiguration toConfiguration() {
219219
configuration.hubPort = null;
220220
} else if (hubHost != null && hubPort != null) {
221221
configuration.hub = null;
222-
if (hubHost != null) {
223-
configuration.hubHost = hubHost;
224-
}
225-
if (hubPort != null) {
226-
configuration.hubPort = hubPort;
227-
}
222+
configuration.hubHost = hubHost;
223+
configuration.hubPort = hubPort;
228224
}
229225
if (configFile != null) {
230226
configuration.nodeConfigFile = configFile;

0 commit comments

Comments
 (0)