hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r755812 - in /httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime: MIME.java MinimalField.java
Date Thu, 19 Mar 2009 02:01:07 GMT
Author: sebb
Date: Thu Mar 19 02:01:06 2009
New Revision: 755812

URL: http://svn.apache.org/viewvc?rev=755812&view=rev
Log:
Immutable classes

Modified:
    httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MIME.java
    httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MinimalField.java

Modified: httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MIME.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MIME.java?rev=755812&r1=755811&r2=755812&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MIME.java
(original)
+++ httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MIME.java
Thu Mar 19 02:01:06 2009
@@ -33,6 +33,8 @@
 
 import java.nio.charset.Charset;
 
+import net.jcip.annotations.Immutable;
+
 import org.apache.james.mime4j.field.FieldName;
 import org.apache.james.mime4j.util.CharsetUtil;
 
@@ -40,6 +42,7 @@
  *
  * @since 4.0
  */
+@Immutable
 public final class MIME {
 
     public static final String CONTENT_TYPE          = FieldName.CONTENT_TYPE;

Modified: httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MinimalField.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MinimalField.java?rev=755812&r1=755811&r2=755812&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MinimalField.java
(original)
+++ httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MinimalField.java
Thu Mar 19 02:01:06 2009
@@ -31,6 +31,8 @@
 
 package org.apache.http.entity.mime;
 
+import net.jcip.annotations.Immutable;
+
 import org.apache.james.mime4j.parser.Field;
 import org.apache.james.mime4j.util.ByteSequence;
 import org.apache.james.mime4j.util.ContentUtil;
@@ -40,12 +42,13 @@
  *
  * @since 4.0
  */
+@Immutable
 public class MinimalField implements Field {
 
     private final String name;
     private final String value;
 
-    private ByteSequence raw;
+    private ByteSequence raw; // cache, recreated on demand
     
     MinimalField(final String name, final String value) {
         super();



Mime
View raw message