mirror of https://github.com/apache/jclouds.git
fixed null pointers
This commit is contained in:
parent
0d3bd74156
commit
69c9fd6905
|
@ -440,7 +440,8 @@ public class TemplateBuilderImpl implements TemplateBuilder {
|
||||||
Ordering.<String> natural().nullsLast())
|
Ordering.<String> natural().nullsLast())
|
||||||
.compare(left.getOperatingSystem().getDescription(), right.getOperatingSystem().getDescription(),//
|
.compare(left.getOperatingSystem().getDescription(), right.getOperatingSystem().getDescription(),//
|
||||||
Ordering.<String> natural().nullsLast())
|
Ordering.<String> natural().nullsLast())
|
||||||
.compare(left.getOperatingSystem().getArch(), right.getOperatingSystem().getArch()).result();
|
.compare(left.getOperatingSystem().getArch(), right.getOperatingSystem().getArch(),//
|
||||||
|
Ordering.<String> natural().nullsLast()).result();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -281,12 +281,12 @@ public abstract class BaseTemplateBuilderLiveTest extends BaseVersionedServiceLi
|
||||||
assertEquals(context.getComputeService().templateBuilder().build().getImage().getDefaultCredentials(),
|
assertEquals(context.getComputeService().templateBuilder().build().getImage().getDefaultCredentials(),
|
||||||
LoginCredentials.builder().user(user).password(pass).authenticateSudo(auth).build());
|
LoginCredentials.builder().user(user).password(pass).authenticateSudo(auth).build());
|
||||||
} finally {
|
} finally {
|
||||||
if (context != null)
|
if (context != null){
|
||||||
|
// Need to clear persisted credentials; otherwise next time a ComputeServiceContext is created
|
||||||
|
// then it will have these "foo" credentials!
|
||||||
|
context.credentialStore().clear();
|
||||||
context.close();
|
context.close();
|
||||||
|
}
|
||||||
// Need to clear persisted credentials; otherwise next time a ComputeServiceContext is created
|
|
||||||
// then it will have these "foo" credentials!
|
|
||||||
context.credentialStore().clear();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue