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

box / box-java-sdk / #6242

10 Feb 2026 05:27PM UTC coverage: 35.714% (+11.4%) from 24.324%
#6242

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%)

2146 existing lines in 544 files now uncovered.

7382 of 20670 relevant lines covered (35.71%)

0.4 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/fileversionbase/FileVersionBase.java
1
package com.box.sdkgen.schemas.fileversionbase;
2

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

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

19
  /** The unique identifier that represent a file version. */
20
  protected final String id;
21

22
  /** The value will always be `file_version`. */
23
  @JsonDeserialize(using = FileVersionBaseTypeField.FileVersionBaseTypeFieldDeserializer.class)
24
  @JsonSerialize(using = FileVersionBaseTypeField.FileVersionBaseTypeFieldSerializer.class)
25
  protected EnumWrapper<FileVersionBaseTypeField> type;
26

27
  public FileVersionBase(@JsonProperty("id") String id) {
28
    super();
×
29
    this.id = id;
×
30
    this.type = new EnumWrapper<FileVersionBaseTypeField>(FileVersionBaseTypeField.FILE_VERSION);
×
31
  }
×
32

33
  protected FileVersionBase(Builder builder) {
34
    super();
×
35
    this.id = builder.id;
×
36
    this.type = builder.type;
×
37
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
38
  }
×
39

40
  public String getId() {
41
    return id;
×
42
  }
43

44
  public EnumWrapper<FileVersionBaseTypeField> getType() {
45
    return type;
×
46
  }
47

48
  @Override
49
  public boolean equals(Object o) {
50
    if (this == o) {
×
51
      return true;
×
52
    }
53
    if (o == null || getClass() != o.getClass()) {
×
54
      return false;
×
55
    }
56
    FileVersionBase casted = (FileVersionBase) o;
×
57
    return Objects.equals(id, casted.id) && Objects.equals(type, casted.type);
×
58
  }
59

60
  @Override
61
  public int hashCode() {
62
    return Objects.hash(id, type);
×
63
  }
64

65
  @Override
66
  public String toString() {
67
    return "FileVersionBase{" + "id='" + id + '\'' + ", " + "type='" + type + '\'' + "}";
×
68
  }
69

70
  public static class Builder extends NullableFieldTracker {
71

72
    protected final String id;
73

74
    protected EnumWrapper<FileVersionBaseTypeField> type;
75

76
    public Builder(String id) {
77
      super();
×
78
      this.id = id;
×
79
    }
×
80

81
    public Builder type(FileVersionBaseTypeField type) {
82
      this.type = new EnumWrapper<FileVersionBaseTypeField>(type);
×
UNCOV
83
      return this;
×
84
    }
85

86
    public Builder type(EnumWrapper<FileVersionBaseTypeField> type) {
87
      this.type = type;
×
UNCOV
88
      return this;
×
89
    }
90

91
    public FileVersionBase build() {
NEW
92
      if (this.type == null) {
×
NEW
93
        this.type =
×
94
            new EnumWrapper<FileVersionBaseTypeField>(FileVersionBaseTypeField.FILE_VERSION);
95
      }
UNCOV
96
      return new FileVersionBase(this);
×
97
    }
98
  }
99
}
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