Index: java/org/apache/commons/httpclient/HttpClient.java =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java,v retrieving revision 1.76.2.1 diff -u -r1.76.2.1 HttpClient.java --- java/org/apache/commons/httpclient/HttpClient.java 16 Sep 2003 21:30:35 -0000 1.76.2.1 +++ java/org/apache/commons/httpclient/HttpClient.java 10 Oct 2003 13:33:05 -0000 @@ -102,20 +102,22 @@ static { if (LOG.isDebugEnabled()) { - LOG.debug("Java version: " + System.getProperty("java.version")); - LOG.debug("Java vendor: " + System.getProperty("java.vendor")); - LOG.debug("Java class path: " + System.getProperty("java.class.path")); - LOG.debug("Operating system name: " + System.getProperty("os.name")); - LOG.debug("Operating system architecture: " + System.getProperty("os.arch")); - LOG.debug("Operating system version: " + System.getProperty("os.version")); + try { + LOG.debug("Java version: " + System.getProperty("java.version")); + LOG.debug("Java vendor: " + System.getProperty("java.vendor")); + LOG.debug("Java class path: " + System.getProperty("java.class.path")); + LOG.debug("Operating system name: " + System.getProperty("os.name")); + LOG.debug("Operating system architecture: " + System.getProperty("os.arch")); + LOG.debug("Operating system version: " + System.getProperty("os.version")); - Provider[] providers = Security.getProviders(); - for (int i = 0; i < providers.length; i++) { - Provider provider = providers[i]; - LOG.debug(provider.getName() + " " + provider.getVersion() - + ": " + provider.getInfo()); + Provider[] providers = Security.getProviders(); + for (int i = 0; i < providers.length; i++) { + Provider provider = providers[i]; + LOG.debug(provider.getName() + " " + provider.getVersion() + + ": " + provider.getInfo()); + } + } catch(SecurityException ignore) { } - } } // ----------------------------------------------------------- Constructors Index: java/org/apache/commons/httpclient/HttpMethodBase.java =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v retrieving revision 1.159.2.11 diff -u -r1.159.2.11 HttpMethodBase.java --- java/org/apache/commons/httpclient/HttpMethodBase.java 8 Oct 2003 23:29:55 -0000 1.159.2.11 +++ java/org/apache/commons/httpclient/HttpMethodBase.java 10 Oct 2003 13:33:07 -0000 @@ -153,9 +153,14 @@ protected static final Header USER_AGENT; static { - String agent = System.getProperties() - .getProperty("httpclient.useragent", - "Jakarta Commons-HttpClient/2.0rc1"); + String agent = null; + try { + agent = System.getProperty("httpclient.useragent"); + } catch (SecurityException ignore) { + } + if (agent == null) { + agent = "Jakarta Commons-HttpClient/2.0rc1"; + } USER_AGENT = new Header("User-Agent", agent); } Index: java/org/apache/commons/httpclient/HttpState.java =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpState.java,v retrieving revision 1.22.2.1 diff -u -r1.22.2.1 HttpState.java --- java/org/apache/commons/httpclient/HttpState.java 16 Sep 2003 21:30:35 -0000 1.22.2.1 +++ java/org/apache/commons/httpclient/HttpState.java 10 Oct 2003 13:33:07 -0000 @@ -164,10 +164,14 @@ this.cookiePolicy = CookiePolicy.getDefaultPolicy(); // check the preemptive policy - // TODO: this needs to be a service from some configuration class - String preemptiveDefault = - System.getProperties().getProperty(PREEMPTIVE_PROPERTY, - PREEMPTIVE_DEFAULT); + String preemptiveDefault = null; + try { + preemptiveDefault = System.getProperty(PREEMPTIVE_PROPERTY); + } catch (SecurityException ignore) { + } + if (preemptiveDefault == null) { + preemptiveDefault = PREEMPTIVE_DEFAULT; + } preemptiveDefault = preemptiveDefault.trim().toLowerCase(); if (!(preemptiveDefault.equals("true") Index: java/org/apache/commons/httpclient/URI.java =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/URI.java,v retrieving revision 1.36.2.3 diff -u -r1.36.2.3 URI.java --- java/org/apache/commons/httpclient/URI.java 23 Sep 2003 13:04:14 -0000 1.36.2.3 +++ java/org/apache/commons/httpclient/URI.java 10 Oct 2003 13:33:11 -0000 @@ -618,7 +618,10 @@ defaultDocumentCharset = defaultDocumentCharsetByLocale; } // in order to support platform encoding - defaultDocumentCharsetByPlatform = System.getProperty("file.encoding"); + try { + defaultDocumentCharsetByPlatform = System.getProperty("file.encoding"); + } catch(SecurityException ignore) { + } if (defaultDocumentCharset == null) { // set the default document charset defaultDocumentCharset = defaultDocumentCharsetByPlatform; Index: java/org/apache/commons/httpclient/cookie/CookiePolicy.java =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/cookie/CookiePolicy.java,v retrieving revision 1.7 diff -u -r1.7 CookiePolicy.java --- java/org/apache/commons/httpclient/cookie/CookiePolicy.java 1 Feb 2003 23:35:43 -0000 1.7 +++ java/org/apache/commons/httpclient/cookie/CookiePolicy.java 10 Oct 2003 13:33:11 -0000 @@ -112,8 +112,11 @@ protected static final Log LOG = LogFactory.getLog(CookiePolicy.class); static { - String s = System.getProperty(SYSTEM_PROPERTY); - + String s = null; + try { + s = System.getProperty(SYSTEM_PROPERTY); + } catch (SecurityException e) { + } if ("COMPATIBILITY".equalsIgnoreCase(s)) { setDefaultPolicy(COMPATIBILITY); } else if ("NETSCAPE_DRAFT".equalsIgnoreCase(s)) {