arturobernalg commented on a change in pull request #319:
URL: 
https://github.com/apache/httpcomponents-client/pull/319#discussion_r739639238



##########
File path: 
httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/ByteArrayBody.java
##########
@@ -56,11 +56,24 @@
      */
     public ByteArrayBody(final byte[] data, final ContentType contentType, 
final String filename) {
         super(contentType);
-        Args.notNull(data, "byte[]");
-        this.data = data;
+        this.data  =Args.notNull(data, "byte[]");
         this.filename = filename;
     }
 
+    /**
+     * Public constructor that creates a new ByteArrayBody.
+     *
+     * @param contentType  the {@link ContentType}
+     * @param data the array of byte.
+     *
+     * @since 5.2
+     */
+    public ByteArrayBody(final byte[] data, final ContentType contentType) {
+        super(contentType);
+        this.data = Args.notNull(data, "byte[]");
+        this.filename = null;
+    }

Review comment:
       HI @michael-o.  True. Good catch. 
   Changed.
   TY




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

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to