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)
|
||||
.build();
|
||||
|
||||
return groupConverter.apply(groupCreator.apply(zoneAndName));
|
||||
return groupConverter.apply(groupCreator.getUnchecked(zoneAndName));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -172,7 +172,7 @@ public class EC2CreateNodesInGroupThenAddToSet implements CreateNodesInGroupThen
|
|||
private void populateCredentials(Set<RunningInstance> input, TemplateOptions options) {
|
||||
LoginCredentials credentials = null;
|
||||
for (RunningInstance instance : input) {
|
||||
credentials = instanceToCredentials.apply(instance).orNull();
|
||||
credentials = instanceToCredentials.getUnchecked(instance).orNull();
|
||||
if (credentials != null)
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ public class NovaSecurityGroupExtension implements SecurityGroupExtension {
|
|||
String markerGroup = namingConvention.create().sharedNameForGroup(name);
|
||||
ZoneSecurityGroupNameAndPorts zoneAndName = new ZoneSecurityGroupNameAndPorts(zone, markerGroup, ImmutableSet.<Integer> of());
|
||||
|
||||
SecurityGroupInZone rawGroup = groupCreator.apply(zoneAndName);
|
||||
SecurityGroupInZone rawGroup = groupCreator.getUnchecked(zoneAndName);
|
||||
return groupConverter.apply(rawGroup);
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ public class SessionManagerTest {
|
|||
expect(sessionApi.login(creds)).andReturn(session);
|
||||
replay(sessionApi);
|
||||
|
||||
assertSame(SessionManager.buildCache(sessionApi).apply(creds), session);
|
||||
assertSame(SessionManager.buildCache(sessionApi).getUnchecked(creds), session);
|
||||
|
||||
verify(sessionApi);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue