Skip to content

Commit be95f1a

Browse files
TsinghuaDreamyndu13
authored andcommitted
fix ECSRamRole NullPointerException
1 parent 4d03611 commit be95f1a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Diff for: aliyun-java-sdk-core/src/main/java/com/aliyuncs/http/clients/CompatibleUrlConnClient.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,7 @@ public HttpResponse syncInvoke(HttpRequest request) throws IOException, ClientEx
6868
parseHttpConn(response, httpConn, content);
6969
return response;
7070
} catch (IOException e) {
71-
content = httpConn.getErrorStream();
72-
response = new HttpResponse(httpConn.getURL().toString());
73-
parseHttpConn(response, httpConn, content);
74-
return response;
71+
throw new ClientException(e.getMessage());
7572
} finally {
7673
if (content != null) {
7774
content.close();

0 commit comments

Comments
 (0)