Classes aren't thread-safe
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@755813 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
864625160f
commit
4726814033
|
@ -31,6 +31,8 @@
|
|||
|
||||
package org.apache.http.entity.mime;
|
||||
|
||||
import net.jcip.annotations.NotThreadSafe;
|
||||
|
||||
import org.apache.http.entity.mime.content.ContentBody;
|
||||
import org.apache.james.mime4j.descriptor.ContentDescriptor;
|
||||
import org.apache.james.mime4j.message.BodyPart;
|
||||
|
@ -44,6 +46,7 @@ import org.apache.james.mime4j.message.Header;
|
|||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@NotThreadSafe // Entity is @NotThreadSafe
|
||||
public class FormBodyPart extends BodyPart {
|
||||
|
||||
private final String name;
|
||||
|
|
|
@ -39,6 +39,8 @@ import java.nio.CharBuffer;
|
|||
import java.nio.charset.Charset;
|
||||
import java.util.List;
|
||||
|
||||
import net.jcip.annotations.NotThreadSafe;
|
||||
|
||||
import org.apache.http.entity.mime.content.ContentBody;
|
||||
import org.apache.http.protocol.HTTP;
|
||||
import org.apache.james.mime4j.field.ContentTypeField;
|
||||
|
@ -62,6 +64,7 @@ import org.apache.james.mime4j.util.CharsetUtil;
|
|||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@NotThreadSafe // parent is @NotThreadSafe
|
||||
public class HttpMultipart extends Multipart {
|
||||
|
||||
private static ByteArrayBuffer encode(Charset charset, String string) {
|
||||
|
|
|
@ -34,6 +34,8 @@ package org.apache.http.entity.mime.content;
|
|||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
import net.jcip.annotations.NotThreadSafe;
|
||||
|
||||
import org.apache.james.mime4j.message.Entity;
|
||||
import org.apache.james.mime4j.message.SingleBody;
|
||||
|
||||
|
@ -41,6 +43,7 @@ import org.apache.james.mime4j.message.SingleBody;
|
|||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@NotThreadSafe // setParent() also SingleBody and Entity are not T-S
|
||||
public abstract class AbstractContentBody extends SingleBody implements ContentBody {
|
||||
|
||||
private final String mimeType;
|
||||
|
|
|
@ -37,12 +37,15 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
import net.jcip.annotations.NotThreadSafe;
|
||||
|
||||
import org.apache.http.entity.mime.MIME;
|
||||
|
||||
/**
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@NotThreadSafe // parent is @NotThreadSafe
|
||||
public class FileBody extends AbstractContentBody {
|
||||
|
||||
private final File file;
|
||||
|
|
|
@ -35,12 +35,15 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
import net.jcip.annotations.NotThreadSafe;
|
||||
|
||||
import org.apache.http.entity.mime.MIME;
|
||||
|
||||
/**
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@NotThreadSafe // parent is @NotThreadSafe
|
||||
public class InputStreamBody extends AbstractContentBody {
|
||||
|
||||
private final InputStream in;
|
||||
|
|
|
@ -42,12 +42,15 @@ import java.nio.charset.Charset;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.jcip.annotations.NotThreadSafe;
|
||||
|
||||
import org.apache.http.entity.mime.MIME;
|
||||
|
||||
/**
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@NotThreadSafe // parent is @NotThreadSafe
|
||||
public class StringBody extends AbstractContentBody {
|
||||
|
||||
private final byte[] content;
|
||||
|
|
Loading…
Reference in New Issue