Deprecate duplicate getters

This commit is contained in:
Andrew Gaul 2013-04-13 11:58:53 -07:00
parent 53da87cba0
commit f2976c2169
3 changed files with 12 additions and 3 deletions

View File

@ -60,6 +60,7 @@ public interface Utils {
* </ul>
*/
@Beta
@Deprecated
Map<String, Credentials> getCredentialStore();
/**
@ -68,6 +69,7 @@ public interface Utils {
@Beta
Map<String, Credentials> credentialStore();
@Deprecated
Json getJson();
/**
@ -93,6 +95,7 @@ public interface Utils {
@Deprecated
HttpAsyncClient asyncHttp();
@Deprecated
HttpClient getHttpClient();
/**
@ -100,6 +103,7 @@ public interface Utils {
*/
HttpClient http();
@Deprecated
Crypto getCrypto();
/**
@ -107,6 +111,7 @@ public interface Utils {
*/
Crypto crypto();
@Deprecated
DateService getDateService();
/**
@ -147,10 +152,12 @@ public interface Utils {
ListeningExecutorService ioExecutor();
@Beta
@Deprecated
EventBus getEventBus();
EventBus eventBus();
@Deprecated
LoggerFactory getLoggerFactory();
/**
@ -160,6 +167,7 @@ public interface Utils {
@Beta
@Deprecated
Injector getInjector();
/**
@ -168,6 +176,7 @@ public interface Utils {
@Beta
Injector injector();
@Deprecated
XMLParser getXml();
/**

View File

@ -22,7 +22,7 @@ public class GaeSocketOpenTest {
.modules(ImmutableSet.of(new GoogleAppEngineConfigurationModule()))
.build();
SocketOpen socketOpen = context.getUtils().getInjector().getInstance(SocketOpen.class);
SocketOpen socketOpen = context.utils().injector().getInstance(SocketOpen.class);
socketOpen.apply(HostAndPort.fromParts("localhost", 22));
}
}

View File

@ -48,11 +48,11 @@ public class AWSEC2ImageExtensionLiveTest extends BaseImageExtensionLiveTest {
@Override
protected Iterable<? extends Image> listImages() {
AWSEC2Client client = view.utils().getInjector().getInstance(AWSEC2Client.class);
AWSEC2Client client = view.utils().injector().getInstance(AWSEC2Client.class);
String[] parts = AWSUtils.parseHandle(imageId);
String region = parts[0];
String imageId = parts[1];
EC2ImageParser parser = view.utils().getInjector().getInstance(EC2ImageParser.class);
EC2ImageParser parser = view.utils().injector().getInstance(EC2ImageParser.class);
return transform(
client.getAMIServices().describeImagesInRegion(region, new DescribeImagesOptions().imageIds(imageId)),
parser);