* @return true if the Status code is {@code StatusCode.SUCCESS}
*/
public boolean isSuccess() {
- return code == StatusCode.SUCCESS;
+ return code == StatusCode.SUCCESS || code == StatusCode.CREATED;
}
/**
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj) {
return true;
- if (obj == null)
+ }
+ if (obj == null) {
return false;
- if (getClass() != obj.getClass())
+ }
+ if (getClass() != obj.getClass()) {
return false;
+ }
Status other = (Status) obj;
- if (code != other.code)
+ if (code != other.code) {
return false;
+ }
return true;
}
}