Add all missing fields to ResponseItem and related classes. by llamahunter · Pull Request #326 · docker-java/docker-java
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure that error can't exist without error details? Shouldn't be it ORed?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If either is not null, its an error. Only when both are null (i.e. 'and') is it safe to return false.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this method should be pushed up to ResponseItem class. Then it should be used in BuildResponseItem.isBuildSuccessIndicated() and PullResponseItem.isPullSuccessIndicated() as pre-condition check.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such refactoring is exceeding the scope of this pull request, which is to get docker-java to stop rejecting valid ProgressDetail messages.