Replace deprecated calls to LoadingCache.apply

This commit is contained in:
Andrew Gaul 2014-05-17 17:39:42 -07:00
parent 62a6842748
commit 79c289da9d
4 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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);
}