Add all missing fields to ResponseItem and related classes. by llamahunter · Pull Request #326 · docker-java/docker-java · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ public class PullResponseItem extends ResponseItem {
*/
@JsonIgnore
public boolean isPullSuccessIndicated() {
if (getStatus() == null)
if (isErrorIndicated() || getStatus() == null) {
return false;
}

return (getStatus().contains("Download complete") || getStatus().contains("Image is up to date") || getStatus()
.contains("Downloaded newer image"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,4 @@ public class PushResponseItem extends ResponseItem {

private static final long serialVersionUID = 8256977108011295857L;

/**
* Returns whether the error field indicates an error
*
* @returns true: the error field indicates an error, false: the error field doesn't indicate an error
*/
@JsonIgnore
public boolean isErrorIndicated() {
if (getError() == null)
return false;

return true;
}
}
70 changes: 55 additions & 15 deletions src/main/java/com/github/dockerjava/api/model/ResponseItem.java