Skip to content

Commit

Permalink
Merge pull request #96 from aliyun/fix-delete-objects
Browse files Browse the repository at this point in the history
fix delete objects
  • Loading branch information
baiyubin2020 authored Jul 12, 2017
2 parents 5a9a578 + 1b71d2d commit 724e341
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The recommended way to use the Aliyun OSS SDK for Java in your project is to con
<dependency>
<groupId>com.aliyun.oss</groupId>
<artifactId>aliyun-sdk-oss</artifactId>
<version>2.8.0</version>
<version>2.8.1</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>com.aliyun.oss</groupId>
<artifactId>aliyun-sdk-oss</artifactId>
<version>2.8.0</version>
<version>2.8.1</version>
<packaging>jar</packaging>
<name>Aliyun OSS SDK for Java</name>
<description>The Aliyun OSS SDK for Java used for accessing Aliyun Object Storage Service</description>
Expand Down
17 changes: 9 additions & 8 deletions src/main/java/com/aliyun/oss/internal/ResponseParsers.java
Original file line number Diff line number Diff line change
Expand Up @@ -742,16 +742,17 @@ public static final class DeleteObjectsResponseParser implements ResponseParser<
@Override
public DeleteObjectsResult parse(ResponseMessage response)
throws ResponseParseException {
// Occurs when deleting multiple objects in quiet mode.
if (response.getContentLength() == 0) {
DeleteObjectsResult result = new DeleteObjectsResult(null);
result.setRequestId(response.getRequestId());
return result;
}

try {
DeleteObjectsResult result = parseDeleteObjectsResult(response.getContent());
DeleteObjectsResult result = null;

// Occurs when deleting multiple objects in quiet mode.
if (response.getContentLength() == 0) {
result = new DeleteObjectsResult(null);
} else {
result = parseDeleteObjectsResult(response.getContent());
}
result.setRequestId(response.getRequestId());

return result;
} finally {
safeCloseResponse(response);
Expand Down

0 comments on commit 724e341

Please sign in to comment.