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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to