mirror of
https://github.com/apache/jclouds.git
synced 2025-02-22 10:29:37 +00:00
fix ResourceType to always have an empty collection
This commit is contained in:
parent
22b72ad25f
commit
9f94c96f7f
@ -130,14 +130,15 @@ public class ResourceType {
|
||||
protected ResourceType(Builder<?> builder) {
|
||||
this.href = builder.href;
|
||||
this.type = builder.type;
|
||||
this.links = builder.links;
|
||||
this.links = builder.links == null ? Collections.<Link>emptySet() : builder.links;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public ResourceType(URI href, String type, @Nullable Set<Link> links) {
|
||||
this.href = href;
|
||||
this.type = type;
|
||||
// nullable so that jaxb wont persist empty collections?
|
||||
this.links = links != null && links.isEmpty() ? null : links;
|
||||
this.links = links == null ? Collections.<Link>emptySet() : links;
|
||||
}
|
||||
|
||||
protected ResourceType() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user