• 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/uploads/UploadFileVersionHeaders.java
1
package com.box.sdkgen.managers.uploads;
2

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

5
import java.util.Map;
6

7
public class UploadFileVersionHeaders {
8

9
  /**
10
   * Ensures this item hasn't recently changed before making changes.
11
   *
12
   * <p>Pass in the item's last observed `etag` value into this header and the endpoint will fail
13
   * with a `412 Precondition Failed` if it has changed since.
14
   */
15
  public String ifMatch;
16

17
  /**
18
   * An optional header containing the SHA1 hash of the file to ensure that the file was not
19
   * corrupted in transit.
20
   */
21
  public String contentMd5;
22

23
  /** Extra headers that will be included in the HTTP request. */
24
  public Map<String, String> extraHeaders;
25

26
  public UploadFileVersionHeaders() {
×
27
    this.extraHeaders = mapOf();
×
28
  }
×
29

30
  protected UploadFileVersionHeaders(Builder builder) {
×
31
    this.ifMatch = builder.ifMatch;
×
32
    this.contentMd5 = builder.contentMd5;
×
33
    this.extraHeaders = builder.extraHeaders;
×
34
  }
×
35

36
  public String getIfMatch() {
37
    return ifMatch;
×
38
  }
39

40
  public String getContentMd5() {
41
    return contentMd5;
×
42
  }
43

44
  public Map<String, String> getExtraHeaders() {
45
    return extraHeaders;
×
46
  }
47

48
  public static class Builder {
49

50
    protected String ifMatch;
51

52
    protected String contentMd5;
53

54
    protected Map<String, String> extraHeaders;
55

NEW
56
    public Builder() {}
×
57

58
    public Builder ifMatch(String ifMatch) {
UNCOV
59
      this.ifMatch = ifMatch;
×
UNCOV
60
      return this;
×
61
    }
62

63
    public Builder contentMd5(String contentMd5) {
UNCOV
64
      this.contentMd5 = contentMd5;
×
UNCOV
65
      return this;
×
66
    }
67

68
    public Builder extraHeaders(Map<String, String> extraHeaders) {
UNCOV
69
      this.extraHeaders = extraHeaders;
×
UNCOV
70
      return this;
×
71
    }
72

73
    public UploadFileVersionHeaders build() {
NEW
74
      if (this.extraHeaders == null) {
×
NEW
75
        this.extraHeaders = mapOf();
×
76
      }
77
      return new UploadFileVersionHeaders(this);
×
78
    }
79
  }
80
}
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