Commits

Sam Adams  committed 0094b0e

Fixed httpcore dependency in webapp

  • Participants
  • Parent commits 543bc72

Comments (0)

Files changed (1)

File client-utils/src/main/java/net/chempound/client/MultipartRelatedEntity.java

     private volatile boolean dirty; // used to decide whether to recalculate length
 
     public MultipartRelatedEntity(
-            HttpMultipartMode mode,
-            String boundary,
+            final HttpMultipartMode mode,
+            final String boundary,
             final Charset charset) {
         super();
-        if (boundary == null) {
-            boundary = generateBoundary();
-        }
-        if (mode == null) {
-            mode = HttpMultipartMode.STRICT;
-        }
-        this.multipart = new HttpMultipart("related", charset, boundary, mode);
+        this.multipart = new HttpMultipart("related", charset, boundary == null ? generateBoundary() : boundary, mode == null ? HttpMultipartMode.STRICT : mode);
         this.contentType = new BasicHeader(
             HTTP.CONTENT_TYPE,
             generateContentType(boundary, charset));