using System.getProperty instead of System.getProperties().getProperty
@@ -62,8 +62,8 @@ public final class NetHttpTransport extends HttpTransport {
private static Proxy defaultProxy() {
return new Proxy(
Proxy.Type.HTTP, new InetSocketAddress(
- System.getProperties().getProperty("https.proxyHost"),
- Integer.parseInt(System.getProperties().getProperty("https.proxyPort"))));
+ System.getProperty("https.proxyHost"),
+ Integer.parseInt(System.getProperty("https.proxyPort"))));
}
/**
@@ -130,7 +130,7 @@ public final class NetHttpTransport extends HttpTransport {
private ConnectionFactory getConnectionFactory(ConnectionFactory connectionFactory) {
if (connectionFactory == null) {
- if (System.getProperties().getProperty("com.google.api.client.should_use_proxy") != null) {
+ if (System.getProperty("com.api.client.should_use_proxy") != null) {
return new DefaultConnectionFactory(defaultProxy());
}
return new DefaultConnectionFactory();
@@ -329,7 +329,7 @@ public final class NetHttpTransport extends HttpTransport {
/** Returns a new instance of {@link NetHttpTransport} based on the options. */
public NetHttpTransport build() {
- if (System.getProperties().getProperty("com.google.api.client.should_use_proxy") != null) {
+ if (System.getProperty("com.google.api.client.should_use_proxy") != null) {
setProxy(defaultProxy());
}
return this.proxy == null
