Skip to content

Commit 6036be3

Browse files
committed
fix npe
1 parent 416369b commit 6036be3

File tree

2 files changed

+12
-22
lines changed

2 files changed

+12
-22
lines changed

google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/Apache5HttpResponseTest.java

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019 Google LLC
2+
* Copyright 2024 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
@@ -14,19 +14,12 @@
1414

1515
package com.google.api.client.http.apache.v5;
1616

17-
import com.google.api.client.http.*;
18-
import org.apache.hc.client5.http.classic.methods.*;
19-
import org.apache.hc.core5.http.*;
20-
import org.apache.hc.core5.http.io.entity.*;
21-
import org.apache.hc.core5.http.protocol.*;
22-
import org.junit.*;
17+
import org.apache.hc.client5.http.classic.methods.HttpPost;
18+
import org.apache.hc.client5.http.classic.methods.HttpUriRequestBase;
19+
import org.junit.Test;
20+
import java.io.InputStream;
2321

24-
import java.io.*;
25-
import java.nio.charset.*;
26-
import java.util.*;
27-
import java.util.concurrent.atomic.*;
28-
29-
import static org.junit.Assert.*;
22+
import static org.junit.Assert.assertNotNull;
3023

3124
public class Apache5HttpResponseTest {
3225
@Test
@@ -44,4 +37,4 @@ public void testNullContent() throws Exception {
4437

4538
assertNotNull(content);
4639
}
47-
}
40+
}

google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/Apache5ResponseContentTest.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019 Google LLC
2+
* Copyright 2024 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
@@ -14,12 +14,9 @@
1414

1515
package com.google.api.client.http.apache.v5;
1616

17-
import org.apache.hc.client5.http.classic.methods.*;
18-
import org.junit.*;
19-
20-
import java.io.*;
21-
22-
import static org.junit.Assert.*;
17+
import java.io.IOException;
18+
import java.io.InputStream;
19+
import org.junit.Test;
2320

2421
public class Apache5ResponseContentTest {
2522
@Test
@@ -47,4 +44,4 @@ public void testNullWrappedContent_doesNotThrowExceptionOnClose() throws Excepti
4744

4845
response.close();
4946
}
50-
}
47+
}

0 commit comments

Comments
 (0)