axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject cvs commit: xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apachesoap WSIFOperation_ApacheSOAP.java
Date Fri, 20 Sep 2002 15:29:56 GMT
antelder    2002/09/20 08:29:56

  Modified:    java/src/org/apache/wsif/providers/soap/apachesoap
                        WSIFOperation_ApacheSOAP.java
  Log:
  Quickly wrap doPrivileged calls around the system property reads I added this morning before
anyone notices I left them out.
  
  Revision  Changes    Path
  1.28      +20 -3     xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apachesoap/WSIFOperation_ApacheSOAP.java
  
  Index: WSIFOperation_ApacheSOAP.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apachesoap/WSIFOperation_ApacheSOAP.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- WSIFOperation_ApacheSOAP.java	20 Sep 2002 09:34:04 -0000	1.27
  +++ WSIFOperation_ApacheSOAP.java	20 Sep 2002 15:29:56 -0000	1.28
  @@ -64,6 +64,8 @@
   import java.io.Serializable;
   import java.io.StringReader;
   import java.net.URL;
  +import java.security.AccessController;
  +import java.security.PrivilegedAction;
   import java.util.ArrayList;
   import java.util.HashMap;
   import java.util.Iterator;
  @@ -1531,7 +1533,12 @@
   
       private boolean isHostInNonProxyProperty(URL u) {
       	if ( u != null ) {
  -           String excludeList = System.getProperty( PROXY_EXCLUDES_PROPERTY );
  +           String excludeList = 
  +              (String) AccessController.doPrivileged(new PrivilegedAction() {
  +                 public Object run() {
  +                    return System.getProperty( PROXY_EXCLUDES_PROPERTY );
  +                 }
  +              });
              if ( excludeList != null ) { 
                 StringTokenizer st = new StringTokenizer( excludeList, "|" );
                 while ( st.hasMoreTokens() ) {
  @@ -1553,8 +1560,18 @@
       private void setSOAPProxy(SOAPTransport st) {
           if (st instanceof SOAPHTTPConnection) {
              SOAPHTTPConnection shttpc = (SOAPHTTPConnection) st;
  -           String proxyHost = System.getProperty( HTTP_PROXY_HOST_PROPERTY ); 
  -           String proxyPort = System.getProperty( HTTP_PROXY_PORT_PROPERTY );         
  +           String proxyHost = 
  +              (String) AccessController.doPrivileged(new PrivilegedAction() {
  +                 public Object run() {
  +                    return System.getProperty( HTTP_PROXY_HOST_PROPERTY );
  +                 }
  +              });
  +           String proxyPort = 
  +              (String) AccessController.doPrivileged(new PrivilegedAction() {
  +                 public Object run() {
  +                    return System.getProperty( HTTP_PROXY_PORT_PROPERTY );
  +                 }
  +              });
              if ( proxyHost != null && proxyHost.length() > 0 ) {
                 shttpc.setProxyHost( proxyHost );
                 if ( proxyPort != null && proxyPort.length() > 0 ) {
  
  
  

Mime
View raw message