code: private int getProxyPortProperty() {
          final String proxyPortString = (getProtocol() == Protocol.HTTPS)
                      ? getSystemProperty("https.proxyPort")
                      : getSystemProperty("http.proxyPort");
          try {
              return Integer.parseInt(proxyPortString);
          } catch (NumberFormatException e) {
              return proxyPort;
          }
      }
docs: Returns the Java system property for proxy port depending on
  {@link #getProtocol()}: i.e. if protocol is https, returns
  the value of the system property https.proxyPort, otherwise
  returns value of http.proxyPort.  Defaults to {@link this.proxyPort}
  if the system property is not set with a valid port number.