• 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/schemas/folderbase/FolderBase.java
1
package com.box.sdkgen.schemas.folderbase;
2

3
import com.box.sdkgen.internal.Nullable;
4
import com.box.sdkgen.internal.NullableFieldTracker;
5
import com.box.sdkgen.internal.SerializableObject;
6
import com.box.sdkgen.serialization.json.EnumWrapper;
7
import com.fasterxml.jackson.annotation.JsonFilter;
8
import com.fasterxml.jackson.annotation.JsonProperty;
9
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
10
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
11
import java.util.Objects;
12

13
/**
14
 * The bare basic representation of a folder, the minimal amount of fields returned when using the
15
 * `fields` query parameter.
16
 */
17
@JsonFilter("nullablePropertyFilter")
18
public class FolderBase extends SerializableObject {
19

20
  /**
21
   * The unique identifier that represent a folder.
22
   *
23
   * <p>The ID for any folder can be determined by visiting a folder in the web application and
24
   * copying the ID from the URL. For example, for the URL `https://*.app.box.com/folders/123` the
25
   * `folder_id` is `123`.
26
   */
27
  protected final String id;
28

29
  /**
30
   * The HTTP `etag` of this folder. This can be used within some API endpoints in the `If-Match`
31
   * and `If-None-Match` headers to only perform changes on the folder if (no) changes have
32
   * happened.
33
   */
34
  @Nullable protected String etag;
35

36
  /** The value will always be `folder`. */
37
  @JsonDeserialize(using = FolderBaseTypeField.FolderBaseTypeFieldDeserializer.class)
38
  @JsonSerialize(using = FolderBaseTypeField.FolderBaseTypeFieldSerializer.class)
39
  protected EnumWrapper<FolderBaseTypeField> type;
40

41
  public FolderBase(@JsonProperty("id") String id) {
42
    super();
×
43
    this.id = id;
×
44
    this.type = new EnumWrapper<FolderBaseTypeField>(FolderBaseTypeField.FOLDER);
×
45
  }
×
46

47
  protected FolderBase(Builder builder) {
48
    super();
×
49
    this.id = builder.id;
×
50
    this.etag = builder.etag;
×
51
    this.type = builder.type;
×
52
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
53
  }
×
54

55
  public String getId() {
56
    return id;
×
57
  }
58

59
  public String getEtag() {
60
    return etag;
×
61
  }
62

63
  public EnumWrapper<FolderBaseTypeField> getType() {
64
    return type;
×
65
  }
66

67
  @Override
68
  public boolean equals(Object o) {
69
    if (this == o) {
×
70
      return true;
×
71
    }
72
    if (o == null || getClass() != o.getClass()) {
×
73
      return false;
×
74
    }
75
    FolderBase casted = (FolderBase) o;
×
76
    return Objects.equals(id, casted.id)
×
77
        && Objects.equals(etag, casted.etag)
×
78
        && Objects.equals(type, casted.type);
×
79
  }
80

81
  @Override
82
  public int hashCode() {
83
    return Objects.hash(id, etag, type);
×
84
  }
85

86
  @Override
87
  public String toString() {
88
    return "FolderBase{"
×
89
        + "id='"
90
        + id
91
        + '\''
92
        + ", "
93
        + "etag='"
94
        + etag
95
        + '\''
96
        + ", "
97
        + "type='"
98
        + type
99
        + '\''
100
        + "}";
101
  }
102

103
  public static class Builder extends NullableFieldTracker {
104

105
    protected final String id;
106

107
    protected String etag;
108

109
    protected EnumWrapper<FolderBaseTypeField> type;
110

111
    public Builder(String id) {
112
      super();
×
113
      this.id = id;
×
114
    }
×
115

116
    public Builder etag(String etag) {
117
      this.etag = etag;
×
118
      this.markNullableFieldAsSet("etag");
×
UNCOV
119
      return this;
×
120
    }
121

122
    public Builder type(FolderBaseTypeField type) {
123
      this.type = new EnumWrapper<FolderBaseTypeField>(type);
×
UNCOV
124
      return this;
×
125
    }
126

127
    public Builder type(EnumWrapper<FolderBaseTypeField> type) {
128
      this.type = type;
×
UNCOV
129
      return this;
×
130
    }
131

132
    public FolderBase build() {
NEW
133
      if (this.type == null) {
×
NEW
134
        this.type = new EnumWrapper<FolderBaseTypeField>(FolderBaseTypeField.FOLDER);
×
135
      }
UNCOV
136
      return new FolderBase(this);
×
137
    }
138
  }
139
}
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