You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "garydgregory (via GitHub)" <gi...@apache.org> on 2023/05/02 13:39:06 UTC
[GitHub] [httpcomponents-core] garydgregory commented on a diff in pull request #404: [HTTPCORE-745] ContentType.create(String, NameValuePair...) defensive copy
garydgregory commented on code in PR #404:
URL: https://github.com/apache/httpcomponents-core/pull/404#discussion_r1182562924
##########
httpcore5/src/main/java/org/apache/hc/core5/http/ContentType.java:
##########
@@ -378,7 +378,7 @@ private static ContentType create(final String mimeType, final NameValuePair[] p
*
* @param mimeType MIME type. It may not be {@code null} or empty. It may not contain
* characters {@code <">, <;>, <,>} reserved by the HTTP specification.
- * @param params parameters.
+ * @param params Changes to this <em>array</em> do not affect this instance. Changes to <em>elements do</em> affect this instance.
Review Comment:
Hi @michael-o
I guess we could say nothing. In retrospect, documenting when code does a defensive copy vs. not could feel over the top. I can take it out, up to you/others to opine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org