Immutable classes

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@755812 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2009-03-19 02:01:06 +00:00
parent d2a63269e5
commit 864625160f
2 changed files with 7 additions and 1 deletions

View File

@ -33,6 +33,8 @@ package org.apache.http.entity.mime;
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 @@ import org.apache.james.mime4j.util.CharsetUtil;
*
* @since 4.0
*/
@Immutable
public final class MIME {
public static final String CONTENT_TYPE = FieldName.CONTENT_TYPE;

View File

@ -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 @@ import org.apache.james.mime4j.util.ContentUtil;
*
* @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();