logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carn...@apache.org
Subject svn commit: r439032 - /logging/log4j/trunk/src/java/org/apache/log4j/net/SMTPAppender.java
Date Thu, 31 Aug 2006 19:48:08 GMT
Author: carnold
Date: Thu Aug 31 12:48:08 2006
New Revision: 439032

URL: http://svn.apache.org/viewvc?rev=439032&view=rev
Log:
Bug 30294: SMTPAppender will not run within sandbox

Modified:
    logging/log4j/trunk/src/java/org/apache/log4j/net/SMTPAppender.java

Modified: logging/log4j/trunk/src/java/org/apache/log4j/net/SMTPAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/java/org/apache/log4j/net/SMTPAppender.java?rev=439032&r1=439031&r2=439032&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/net/SMTPAppender.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/net/SMTPAppender.java Thu Aug 31 12:48:08
2006
@@ -190,7 +190,12 @@
    *  @param mail session, may not be null.
    */
   protected Session createSession() {
-    Properties props = new Properties (System.getProperties());
+    Properties props = null;
+    try {
+        props = new Properties (System.getProperties());
+    } catch(SecurityException ex) {
+        props = new Properties();
+    }
     if (smtpHost != null) {
       props.put("mail.smtp.host", smtpHost);
     }



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


Mime
View raw message