commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-commons/logging/src/java/org/apache/commons/logging/impl SimpleLog.java
Date Tue, 15 Jul 2003 15:47:38 GMT
craigmcc    2003/07/15 08:47:38

  Modified:    logging/src/java/org/apache/commons/logging/impl
                        SimpleLog.java
  Log:
  Make SimpleLog more friendly to the security manager in an applet
  environment, by swallowing any security exceptions when looking
  up system properties that are not accessible.
  
  Revision  Changes    Path
  1.10      +10 -5     jakarta-commons/logging/src/java/org/apache/commons/logging/impl/SimpleLog.java
  
  Index: SimpleLog.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/impl/SimpleLog.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SimpleLog.java	30 Mar 2003 23:42:36 -0000	1.9
  +++ SimpleLog.java	15 Jul 2003 15:47:38 -0000	1.10
  @@ -159,7 +159,12 @@
       // ------------------------------------------------------------ Initializer
       
       private static String getStringProperty(String name) {
  -        String prop = System.getProperty(name);
  +        String prop = null;
  +	try {
  +	    prop = System.getProperty(name);
  +	} catch (SecurityException e) {
  +	    ; // Ignore
  +	}
           return (prop == null) ? simpleLogProps.getProperty(name) : prop;
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message