Skip to content

Commit

Permalink
Fixing parameters parsing. Fixes issue 7014
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Mar 6, 2014
1 parent 860e74c commit 4d025d3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions java/server/src/org/openqa/grid/internal/BaseRemoteProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,7 @@ public BaseRemoteProxy(RegistrationRequest request, Registry registry) {
maxConcurrentSession = getConfigInteger(RegistrationRequest.MAX_SESSION);
cleanUpCycle = getConfigInteger(RegistrationRequest.CLEAN_UP_CYCLE);
timeOutMs = getConfigInteger(RegistrationRequest.TIME_OUT);
Object tm = this.config.get(RegistrationRequest.STATUS_CHECK_TIMEOUT);
if (tm == null) {
tm = new Integer(0);
}
statusCheckTimeout = ((Integer) tm).intValue();
statusCheckTimeout = getConfigInteger(RegistrationRequest.STATUS_CHECK_TIMEOUT);

List<DesiredCapabilities> capabilities = request.getCapabilities();

Expand Down Expand Up @@ -178,6 +174,9 @@ public BaseRemoteProxy(RegistrationRequest request, Registry registry) {

private Integer getConfigInteger(String key){
Object o = this.config.get(key);
if (o == null) {
return 0;
}
if (o instanceof String){
return Integer.parseInt((String)o);
}
Expand Down

0 comments on commit 4d025d3

Please sign in to comment.