Skip to content

Commit

Permalink
Make sendHttpRequest protected
Browse files Browse the repository at this point in the history
It could not be implemented by classes outside the same package previously because it was package-private.

Closes gh-3308
  • Loading branch information
shakuzen committed Jul 22, 2022
1 parent 244bbdb commit 2a7b1dc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected String timerName() {
* forward slash, and optionally containing path variable placeholders
* @param pathVariables optional variables to substitute into the templatedPath
*/
abstract void sendHttpRequest(HttpMethod method, @Nullable byte[] body, URI baseUrl, String templatedPath,
protected abstract void sendHttpRequest(HttpMethod method, @Nullable byte[] body, URI baseUrl, String templatedPath,
String... pathVariables);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected String timerName() {
}

@Override
void sendHttpRequest(HttpMethod method, @Nullable byte[] body, URI baseUri, String templatedPath,
protected void sendHttpRequest(HttpMethod method, @Nullable byte[] body, URI baseUri, String templatedPath,
String... pathVariables) {
try {
EntityUtils.consume(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void setup() throws Exception {
}

@Override
void sendHttpRequest(HttpMethod method, @Nullable byte[] body, URI baseUri, String templatedPath,
protected void sendHttpRequest(HttpMethod method, @Nullable byte[] body, URI baseUri, String templatedPath,
String... pathVariables) {
try {
Request request = httpClient.newRequest(baseUri + substitutePathVariables(templatedPath, pathVariables))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class OkHttpClientTimingInstrumentationVerificationTests extends HttpClientTimin
.eventListener(OkHttpMetricsEventListener.builder(getRegistry(), timerName()).build()).build();

@Override
void sendHttpRequest(HttpMethod method, @Nullable byte[] body, URI baseUri, String templatedPath,
protected void sendHttpRequest(HttpMethod method, @Nullable byte[] body, URI baseUri, String templatedPath,
String... pathVariables) {
Request request = new Request.Builder().method(method.name(), body == null ? null : RequestBody.create(body))
.url(baseUri + substitutePathVariables(templatedPath, pathVariables))
Expand Down

0 comments on commit 2a7b1dc

Please sign in to comment.