mirror of https://github.com/apache/jclouds.git
vcloud-director 1.5: addressing review comments/nits
This commit is contained in:
parent
335e14f505
commit
03e622ba2a
|
@ -73,7 +73,7 @@ public class ResourceEntities {
|
|||
* @see ResourceEntities#getResourceEntities()
|
||||
*/
|
||||
public Builder resourceEntities(Set<Reference> resourceEntities) {
|
||||
this.resourceEntities = Sets.newLinkedHashSet(checkNotNull(resourceEntities, "resourceEntities"));
|
||||
this.resourceEntities = ImmutableSet.copyOf(checkNotNull(resourceEntities, "resourceEntities"));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ public class SourcedCompositionItemParam {
|
|||
* @see SourcedCompositionItemParam#getNetworkAssignments()
|
||||
*/
|
||||
public Builder networkAssignments(Set<NetworkAssignment> networkAssignments) {
|
||||
this.networkAssignments = checkNotNull(networkAssignments, "networkAssignments");
|
||||
this.networkAssignments = ImmutableSet.copyOf(checkNotNull(networkAssignments, "networkAssignments"));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ public class StaticRoute {
|
|||
private String name;
|
||||
private String network;
|
||||
private String nextHopIp;
|
||||
private String _interface;
|
||||
private String theInterface;
|
||||
|
||||
/**
|
||||
* @see StaticRoute#getName()
|
||||
|
@ -101,20 +101,20 @@ public class StaticRoute {
|
|||
/**
|
||||
* @see StaticRoute#getInterface()
|
||||
*/
|
||||
public Builder _interface(String _interface) {
|
||||
this._interface = _interface;
|
||||
public Builder setInterface(String theInterface) {
|
||||
this.theInterface = theInterface;
|
||||
return this;
|
||||
}
|
||||
|
||||
public StaticRoute build() {
|
||||
return new StaticRoute(name, network, nextHopIp, _interface);
|
||||
return new StaticRoute(name, network, nextHopIp, theInterface);
|
||||
}
|
||||
|
||||
public Builder fromStaticRoute(StaticRoute in) {
|
||||
return name(in.getName())
|
||||
.network(in.getNetwork())
|
||||
.nextHopIp(in.getNextHopIp())
|
||||
._interface(in.getInterface());
|
||||
.setInterface(in.getInterface());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -71,13 +71,13 @@ public class StaticRoutingService extends NetworkServiceType<StaticRoutingServic
|
|||
|
||||
public static class Builder extends NetworkServiceType.Builder<StaticRoutingService> {
|
||||
|
||||
private List<StaticRoute> staticRoutes;
|
||||
private List<StaticRoute> staticRoutes = ImmutableList.of();
|
||||
|
||||
/**
|
||||
* @see StaticRoutingService#getStaticRoutes()
|
||||
*/
|
||||
public Builder staticRoutes(List<StaticRoute> staticRoutes) {
|
||||
this.staticRoutes = checkNotNull(staticRoutes, "staticRoutes");
|
||||
this.staticRoutes = ImmutableList.copyOf(checkNotNull(staticRoutes, "staticRoutes"));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ public class TasksInProgress {
|
|||
* @see TasksInProgress#getTasks()
|
||||
*/
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
this.tasks = checkNotNull(tasks, "tasks");
|
||||
this.tasks = ImmutableSet.copyOf(checkNotNull(tasks, "tasks"));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue