#147 - Added toString() methods to VndErrors and VndError.
Removed duplicate test class.
This commit is contained in:
@@ -26,6 +26,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* A representation model class to be rendered as specified for the media type {@code application/vnd.error}.
|
||||
@@ -117,6 +118,15 @@ public class VndErrors implements Iterable<VndErrors.VndError> {
|
||||
return this.vndErrors.iterator();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("VndErrors[%s]", StringUtils.collectionToCommaDelimitedString(vndErrors));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
@@ -207,6 +217,16 @@ public class VndErrors implements Iterable<VndErrors.VndError> {
|
||||
return message;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.hateoas.ResourceSupport#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("VndError[logref: %s, message: %s, links: [%s]]", logref, message,
|
||||
StringUtils.collectionToCommaDelimitedString(getLinks()));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.hateoas.ResourceSupport#hashCode()
|
||||
|
||||
Reference in New Issue
Block a user