You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ca...@apache.org on 2006/01/24 01:09:20 UTC

svn commit: r371726 - /logging/log4j/trunk/src/java/org/apache/log4j/net/SMTPAppender.java

Author: carnold
Date: Mon Jan 23 16:09:18 2006
New Revision: 371726

URL: http://svn.apache.org/viewcvs?rev=371726&view=rev
Log:
Bug 35452: Restored member type for o.a.l.net.SMTPAppender.msg

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/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/net/SMTPAppender.java?rev=371726&r1=371725&r2=371726&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 Mon Jan 23 16:09:18 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
+ * Copyright 1999,2006 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -84,7 +84,7 @@
   private int bufferSize = 512;
   private boolean locationInfo = false;
   protected CyclicBuffer cb = new CyclicBuffer(bufferSize);
-  protected MimeMessage msg;
+  protected Message msg;
   protected TriggeringEventEvaluator evaluator;
   private PatternLayout subjectLayout;
 
@@ -253,8 +253,10 @@
     try {
       MimeBodyPart part = new MimeBodyPart();
       
-      String computedSubject = computeSubject(triggeringEvent);
-      msg.setSubject(computedSubject, charset);
+      if (msg instanceof MimeMessage) {
+        String computedSubject = computeSubject(triggeringEvent);
+        ((MimeMessage) msg).setSubject(computedSubject, charset);
+      }
       
       StringBuffer sbuf = new StringBuffer();
       String t = layout.getHeader();



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