• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

box / box-java-sdk / #6241

10 Feb 2026 05:27PM UTC coverage: 24.324% (+11.5%) from 12.84%
#6241

push

github

web-flow
fix(boxsdkgen): Move assigning default values from builder constructor to `build()` method (box/box-codegen#922) (#1712)

0 of 1677 new or added lines in 569 files covered. (0.0%)

2130 existing lines in 537 files now uncovered.

7388 of 30373 relevant lines covered (24.32%)

0.28 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/com/box/sdkgen/managers/chunkeduploads/UploadFilePartHeaders.java
1
package com.box.sdkgen.managers.chunkeduploads;
2

3
import static com.box.sdkgen.internal.utils.UtilsManager.mapOf;
4

5
import java.util.Map;
6

7
public class UploadFilePartHeaders {
8

9
  /**
10
   * The [RFC3230][1] message digest of the chunk uploaded.
11
   *
12
   * <p>Only SHA1 is supported. The SHA1 digest must be base64 encoded. The format of this header is
13
   * as `sha=BASE64_ENCODED_DIGEST`.
14
   *
15
   * <p>To get the value for the `SHA` digest, use the openSSL command to encode the file part:
16
   * `openssl sha1 -binary &lt;FILE_PART_NAME&gt; | base64`.
17
   *
18
   * <p>[1]: https://tools.ietf.org/html/rfc3230
19
   */
20
  public final String digest;
21

22
  /**
23
   * The byte range of the chunk.
24
   *
25
   * <p>Must not overlap with the range of a part already uploaded this session. Each part’s size
26
   * must be exactly equal in size to the part size specified in the upload session that you
27
   * created. One exception is the last part of the file, as this can be smaller.
28
   *
29
   * <p>When providing the value for `content-range`, remember that:
30
   *
31
   * <p>* The lower bound of each part's byte range must be a multiple of the part size. * The
32
   * higher bound must be a multiple of the part size - 1.
33
   */
34
  public final String contentRange;
35

36
  /** Extra headers that will be included in the HTTP request. */
37
  public Map<String, String> extraHeaders;
38

39
  public UploadFilePartHeaders(String digest, String contentRange) {
×
40
    this.digest = digest;
×
41
    this.contentRange = contentRange;
×
42
    this.extraHeaders = mapOf();
×
43
  }
×
44

45
  protected UploadFilePartHeaders(Builder builder) {
×
46
    this.digest = builder.digest;
×
47
    this.contentRange = builder.contentRange;
×
48
    this.extraHeaders = builder.extraHeaders;
×
49
  }
×
50

51
  public String getDigest() {
52
    return digest;
×
53
  }
54

55
  public String getContentRange() {
56
    return contentRange;
×
57
  }
58

59
  public Map<String, String> getExtraHeaders() {
60
    return extraHeaders;
×
61
  }
62

63
  public static class Builder {
64

65
    protected final String digest;
66

67
    protected final String contentRange;
68

69
    protected Map<String, String> extraHeaders;
70

71
    public Builder(String digest, String contentRange) {
×
72
      this.digest = digest;
×
73
      this.contentRange = contentRange;
×
74
    }
×
75

76
    public Builder extraHeaders(Map<String, String> extraHeaders) {
77
      this.extraHeaders = extraHeaders;
×
UNCOV
78
      return this;
×
79
    }
80

81
    public UploadFilePartHeaders build() {
NEW
82
      if (this.extraHeaders == null) {
×
NEW
83
        this.extraHeaders = mapOf();
×
84
      }
UNCOV
85
      return new UploadFilePartHeaders(this);
×
86
    }
87
  }
88
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc