Skip to content

Commit f36e832

Browse files
committed
url should never be null, remove check
1 parent 3d3c8c3 commit f36e832

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/telemetry/HttpTracingRequestInitializer.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,7 @@ static void addResponseBodySizeToSpan(HttpResponse response, Span span) {
143143

144144
/** Removes credentials from URL. */
145145
private static String getSanitizedUrl(HttpRequest request) {
146-
GenericUrl url = request.getUrl();
147-
if (url == null) {
148-
return null;
149-
}
150-
GenericUrl clone = url.clone();
146+
GenericUrl clone = request.getUrl().clone();
151147
// redact credentials sent as part of the address
152148
if (clone.getUserInfo() != null) {
153149
clone.setUserInfo("REDACTED:REDACTED");

0 commit comments

Comments
 (0)