mirror of https://github.com/apache/jclouds.git
Replace deprecated calls to LoadingCache.apply
This commit is contained in:
parent
62a6842748
commit
79c289da9d
|
@ -141,7 +141,7 @@ public class CloudStackSecurityGroupExtension implements SecurityGroupExtension
|
||||||
.name(markerGroup)
|
.name(markerGroup)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return groupConverter.apply(groupCreator.apply(zoneAndName));
|
return groupConverter.apply(groupCreator.getUnchecked(zoneAndName));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -172,7 +172,7 @@ public class EC2CreateNodesInGroupThenAddToSet implements CreateNodesInGroupThen
|
||||||
private void populateCredentials(Set<RunningInstance> input, TemplateOptions options) {
|
private void populateCredentials(Set<RunningInstance> input, TemplateOptions options) {
|
||||||
LoginCredentials credentials = null;
|
LoginCredentials credentials = null;
|
||||||
for (RunningInstance instance : input) {
|
for (RunningInstance instance : input) {
|
||||||
credentials = instanceToCredentials.apply(instance).orNull();
|
credentials = instanceToCredentials.getUnchecked(instance).orNull();
|
||||||
if (credentials != null)
|
if (credentials != null)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,7 +173,7 @@ public class NovaSecurityGroupExtension implements SecurityGroupExtension {
|
||||||
String markerGroup = namingConvention.create().sharedNameForGroup(name);
|
String markerGroup = namingConvention.create().sharedNameForGroup(name);
|
||||||
ZoneSecurityGroupNameAndPorts zoneAndName = new ZoneSecurityGroupNameAndPorts(zone, markerGroup, ImmutableSet.<Integer> of());
|
ZoneSecurityGroupNameAndPorts zoneAndName = new ZoneSecurityGroupNameAndPorts(zone, markerGroup, ImmutableSet.<Integer> of());
|
||||||
|
|
||||||
SecurityGroupInZone rawGroup = groupCreator.apply(zoneAndName);
|
SecurityGroupInZone rawGroup = groupCreator.getUnchecked(zoneAndName);
|
||||||
return groupConverter.apply(rawGroup);
|
return groupConverter.apply(rawGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class SessionManagerTest {
|
||||||
expect(sessionApi.login(creds)).andReturn(session);
|
expect(sessionApi.login(creds)).andReturn(session);
|
||||||
replay(sessionApi);
|
replay(sessionApi);
|
||||||
|
|
||||||
assertSame(SessionManager.buildCache(sessionApi).apply(creds), session);
|
assertSame(SessionManager.buildCache(sessionApi).getUnchecked(creds), session);
|
||||||
|
|
||||||
verify(sessionApi);
|
verify(sessionApi);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue