Skip to content

Commit

Permalink
java json converter chooses Long (Number base class). Fixing RemoteNe…
Browse files Browse the repository at this point in the history
…tworkConnection
  • Loading branch information
lukeis committed May 6, 2014
1 parent 72e85ca commit 30efd0c
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,17 @@ public RemoteNetworkConnection(ExecuteMethod executeMethod) {

@Override
public ConnectionType getNetworkConnection() {
return new ConnectionType(
(Integer) executeMethod.execute(DriverCommand.GET_NETWORK_CONNECTION, null));
return new ConnectionType(((Number) executeMethod.execute(DriverCommand.GET_NETWORK_CONNECTION,
null)).intValue());
}

@Override
public ConnectionType setNetworkConnection(
ConnectionType type) {
Map<String, ConnectionType> mode = ImmutableMap.of("type", type);
return new ConnectionType((Integer) executeMethod
.execute(DriverCommand.SET_NETWORK_CONNECTION, ImmutableMap.of("parameters", mode)));
return new ConnectionType(((Number) executeMethod.execute(DriverCommand.SET_NETWORK_CONNECTION,
ImmutableMap
.of("parameters", mode)))
.intValue());
}
}

0 comments on commit 30efd0c

Please sign in to comment.