[jboss-cvs] jboss-mail/src/java/org/jboss/mail/message ...
Aron Sogor
bigman at gmail.com
Fri Jul 28 00:56:50 EDT 2006
User: asogor
Date: 06/07/28 00:56:50
Modified: src/java/org/jboss/mail/message MailHeaders.java Mail.java
Log:
I changed the magic sting into a constant.. Tell me if you do not like propose better. Magic strings are bad.
Revision Changes Path
1.11 +8 -1 jboss-mail/src/java/org/jboss/mail/message/MailHeaders.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: MailHeaders.java
===================================================================
RCS file: /cvsroot/jboss/jboss-mail/src/java/org/jboss/mail/message/MailHeaders.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- MailHeaders.java 11 Jun 2006 14:19:54 -0000 1.10
+++ MailHeaders.java 28 Jul 2006 04:56:50 -0000 1.11
@@ -28,9 +28,16 @@
* User does not have to worry about RFC822 compliance.
* @author Michael Krause
* @author Andrew C. Oliver <acoliver ot jboss dat org> - Javadoc comments only! :-(
- * @version $Revision: 1.10 $
+ * @version $Revision: 1.11 $
*/
public interface MailHeaders extends Iterable<String> {
+
+
+ /**
+ * Common header key for Subject
+ */
+ public static final String HEADER_SUBJECT = "Subject";
+
/**
* load the headers from the input stream. once this is done the input stream should be right at the body.
* @param is input stream to read the headers off of
1.41 +2 -2 jboss-mail/src/java/org/jboss/mail/message/Mail.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Mail.java
===================================================================
RCS file: /cvsroot/jboss/jboss-mail/src/java/org/jboss/mail/message/Mail.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- Mail.java 24 Jul 2006 19:27:47 -0000 1.40
+++ Mail.java 28 Jul 2006 04:56:50 -0000 1.41
@@ -58,7 +58,7 @@
* @author Andrew C. Oliver
* @author Eric Daugherty
* @auther Michael Barker
- * @version $Revision: 1.40 $
+ * @version $Revision: 1.41 $
*/
public class Mail implements Message, Serializable {
private final static byte CR = (byte) '\r';
@@ -503,7 +503,7 @@
}
}
- ih.addHeader("Subject", subject);
+ ih.addHeader(MailHeaders.HEADER_SUBJECT, subject);
byte[] msgbytes = body.getBytes();
ByteArrayInputStream msgIn = new ByteArrayInputStream(msgbytes);
More information about the jboss-cvs-commits
mailing list