Return-Path: X-Original-To: apmail-hc-commits-archive@www.apache.org Delivered-To: apmail-hc-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C172517D0C for ; Sat, 11 Oct 2014 17:47:37 +0000 (UTC) Received: (qmail 41538 invoked by uid 500); 11 Oct 2014 17:47:37 -0000 Delivered-To: apmail-hc-commits-archive@hc.apache.org Received: (qmail 41495 invoked by uid 500); 11 Oct 2014 17:47:37 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 41486 invoked by uid 99); 11 Oct 2014 17:47:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Oct 2014 17:47:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Oct 2014 17:47:36 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 6193923889F1 for ; Sat, 11 Oct 2014 17:47:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1631092 - in /httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol: BasicAsyncRequestProducer.java BasicAsyncResponseProducer.java Date: Sat, 11 Oct 2014 17:47:16 -0000 To: commits@hc.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141011174716.6193923889F1@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: olegk Date: Sat Oct 11 17:47:15 2014 New Revision: 1631092 URL: http://svn.apache.org/r1631092 Log: Do not synchronize methods of BasicAsyncRequestProducer and BasicAsyncResponseProducer Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncRequestProducer.java httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncResponseProducer.java Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncRequestProducer.java URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncRequestProducer.java?rev=1631092&r1=1631091&r2=1631092&view=diff ============================================================================== --- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncRequestProducer.java (original) +++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncRequestProducer.java Sat Oct 11 17:47:15 2014 @@ -32,7 +32,6 @@ import org.apache.http.HttpEntity; import org.apache.http.HttpEntityEnclosingRequest; import org.apache.http.HttpHost; import org.apache.http.HttpRequest; -import org.apache.http.annotation.ThreadSafe; import org.apache.http.nio.ContentEncoder; import org.apache.http.nio.IOControl; import org.apache.http.nio.entity.EntityAsyncContentProducer; @@ -50,7 +49,6 @@ import org.apache.http.util.Args; * * @since 4.2 */ -@ThreadSafe public class BasicAsyncRequestProducer implements HttpAsyncRequestProducer { private final HttpHost target; @@ -111,7 +109,7 @@ public class BasicAsyncRequestProducer i } @Override - public synchronized HttpRequest generateRequest() { + public HttpRequest generateRequest() { return this.request; } @@ -121,7 +119,7 @@ public class BasicAsyncRequestProducer i } @Override - public synchronized void produceContent( + public void produceContent( final ContentEncoder encoder, final IOControl ioctrl) throws IOException { if (this.producer != null) { this.producer.produceContent(encoder, ioctrl); @@ -140,19 +138,19 @@ public class BasicAsyncRequestProducer i } @Override - public synchronized boolean isRepeatable() { + public boolean isRepeatable() { return this.producer == null || this.producer.isRepeatable(); } @Override - public synchronized void resetRequest() throws IOException { + public void resetRequest() throws IOException { if (this.producer != null) { this.producer.close(); } } @Override - public synchronized void close() throws IOException { + public void close() throws IOException { if (this.producer != null) { this.producer.close(); } Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncResponseProducer.java URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncResponseProducer.java?rev=1631092&r1=1631091&r2=1631092&view=diff ============================================================================== --- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncResponseProducer.java (original) +++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncResponseProducer.java Sat Oct 11 17:47:15 2014 @@ -31,7 +31,6 @@ import java.io.IOException; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; -import org.apache.http.annotation.ThreadSafe; import org.apache.http.nio.ContentEncoder; import org.apache.http.nio.IOControl; import org.apache.http.nio.entity.EntityAsyncContentProducer; @@ -50,7 +49,6 @@ import org.apache.http.util.Args; * * @since 4.2 */ -@ThreadSafe public class BasicAsyncResponseProducer implements HttpAsyncResponseProducer { private final HttpResponse response; @@ -100,12 +98,12 @@ public class BasicAsyncResponseProducer } @Override - public synchronized HttpResponse generateResponse() { + public HttpResponse generateResponse() { return this.response; } @Override - public synchronized void produceContent( + public void produceContent( final ContentEncoder encoder, final IOControl ioctrl) throws IOException { if (this.producer != null) { this.producer.produceContent(encoder, ioctrl); @@ -124,7 +122,7 @@ public class BasicAsyncResponseProducer } @Override - public synchronized void close() throws IOException { + public void close() throws IOException { if (this.producer != null) { this.producer.close(); }