From 79c289da9d630ba638646eb511542cc99305548a Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Sat, 17 May 2014 17:39:42 -0700 Subject: [PATCH] Replace deprecated calls to LoadingCache.apply --- .../compute/extensions/CloudStackSecurityGroupExtension.java | 2 +- .../ec2/compute/strategy/EC2CreateNodesInGroupThenAddToSet.java | 2 +- .../v2_0/compute/extensions/NovaSecurityGroupExtension.java | 2 +- .../java/org/jclouds/dynect/v3/filters/SessionManagerTest.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/extensions/CloudStackSecurityGroupExtension.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/extensions/CloudStackSecurityGroupExtension.java index dd36ee58b9..f16bf987ca 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/extensions/CloudStackSecurityGroupExtension.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/extensions/CloudStackSecurityGroupExtension.java @@ -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 diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2CreateNodesInGroupThenAddToSet.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2CreateNodesInGroupThenAddToSet.java index 483a29bcd3..b2aacbad2e 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2CreateNodesInGroupThenAddToSet.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2CreateNodesInGroupThenAddToSet.java @@ -172,7 +172,7 @@ public class EC2CreateNodesInGroupThenAddToSet implements CreateNodesInGroupThen private void populateCredentials(Set input, TemplateOptions options) { LoginCredentials credentials = null; for (RunningInstance instance : input) { - credentials = instanceToCredentials.apply(instance).orNull(); + credentials = instanceToCredentials.getUnchecked(instance).orNull(); if (credentials != null) break; } diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/extensions/NovaSecurityGroupExtension.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/extensions/NovaSecurityGroupExtension.java index 8b36fc96ee..a204a39a74 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/extensions/NovaSecurityGroupExtension.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/extensions/NovaSecurityGroupExtension.java @@ -173,7 +173,7 @@ public class NovaSecurityGroupExtension implements SecurityGroupExtension { String markerGroup = namingConvention.create().sharedNameForGroup(name); ZoneSecurityGroupNameAndPorts zoneAndName = new ZoneSecurityGroupNameAndPorts(zone, markerGroup, ImmutableSet. of()); - SecurityGroupInZone rawGroup = groupCreator.apply(zoneAndName); + SecurityGroupInZone rawGroup = groupCreator.getUnchecked(zoneAndName); return groupConverter.apply(rawGroup); } diff --git a/providers/dynect/src/test/java/org/jclouds/dynect/v3/filters/SessionManagerTest.java b/providers/dynect/src/test/java/org/jclouds/dynect/v3/filters/SessionManagerTest.java index f5d417603e..c26c0ddd91 100644 --- a/providers/dynect/src/test/java/org/jclouds/dynect/v3/filters/SessionManagerTest.java +++ b/providers/dynect/src/test/java/org/jclouds/dynect/v3/filters/SessionManagerTest.java @@ -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); }