Skip to content

Commit

Permalink
Revert "[java] make the json parsing exception text more helpful"
Browse files Browse the repository at this point in the history
This reverts commit ce7cfc8.
  • Loading branch information
joerg1985 committed Nov 4, 2023
1 parent cf97bb1 commit 70e8801
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
5 changes: 4 additions & 1 deletion java/src/org/openqa/selenium/grid/router/HandleSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import org.openqa.selenium.grid.sessionmap.SessionMap;
import org.openqa.selenium.grid.web.ReverseProxyHandler;
import org.openqa.selenium.internal.Require;
import org.openqa.selenium.net.Urls;
import org.openqa.selenium.remote.SessionId;
import org.openqa.selenium.remote.http.ClientConfig;
import org.openqa.selenium.remote.http.HttpClient;
Expand Down Expand Up @@ -236,7 +237,9 @@ private Callable<UsageCountingReverseProxyHandler> loadSessionId(
}

ClientConfig config =
ClientConfig.defaultConfig().baseUri(sessionUri).withRetries();
ClientConfig.defaultConfig()
.baseUri(sessionUri)
.withRetries();
HttpClient httpClient = httpClientFactory.createClient(config);

return new CacheEntry(httpClient, 1);
Expand Down
13 changes: 1 addition & 12 deletions java/src/org/openqa/selenium/json/Input.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,7 @@ public String toString() {
length = MEMORY_SIZE;
}

String last = "Last " + length + " characters read: " + new String(buffer, offset, length);
int next = Math.min(MEMORY_SIZE, filled - (offset + length));

if (next > 0) {
return last
+ ", next "
+ next
+ " characters to read: "
+ new String(buffer, offset + length, next);
}

return last;
return "Last " + length + " characters read: " + new String(buffer, offset, length);
}

/**
Expand Down

0 comments on commit 70e8801

Please sign in to comment.