You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2019/02/15 08:16:41 UTC

[GitHub] ok2c commented on a change in pull request #106: Immutable HttpEntity classes

ok2c commented on a change in pull request #106: Immutable HttpEntity classes
URL: https://github.com/apache/httpcomponents-core/pull/106#discussion_r257138672
 
 

 ##########
 File path: httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/InputStreamEntity.java
 ##########
 @@ -31,87 +31,52 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 
+import org.apache.hc.core5.annotation.Contract;
+import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.ContentType;
 import org.apache.hc.core5.util.Args;
 
 /**
- * A streamed, non-repeatable entity that obtains its content from
- * an {@link InputStream}.
+ * A streamed, non-repeatable entity that obtains its content from an {@link InputStream}.
  *
  * @since 4.0
  */
+@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
 
 Review comment:
   @rschmitt This is why there is `IMMUTABLE` and `IMMUTABLE_CONDITIONAL` with much weaker guarantees.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org