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

3
import com.box.sdkgen.schemas.storagepolicymini.StoragePolicyMini;
4
import com.box.sdkgen.schemas.storagepolicymini.StoragePolicyMiniTypeField;
5
import com.box.sdkgen.serialization.json.EnumWrapper;
6
import com.fasterxml.jackson.annotation.JsonFilter;
7
import com.fasterxml.jackson.annotation.JsonProperty;
8
import java.util.Objects;
9

10
/** The Storage Policy object describes the storage zone. */
11
@JsonFilter("nullablePropertyFilter")
12
public class StoragePolicy extends StoragePolicyMini {
13

14
  /** A descriptive name of the region. */
15
  protected String name;
16

17
  public StoragePolicy(@JsonProperty("id") String id) {
18
    super(id);
×
19
  }
×
20

21
  protected StoragePolicy(Builder builder) {
22
    super(builder);
×
23
    this.name = builder.name;
×
24
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
25
  }
×
26

27
  public String getName() {
28
    return name;
×
29
  }
30

31
  @Override
32
  public boolean equals(Object o) {
33
    if (this == o) {
×
34
      return true;
×
35
    }
36
    if (o == null || getClass() != o.getClass()) {
×
37
      return false;
×
38
    }
39
    StoragePolicy casted = (StoragePolicy) o;
×
40
    return Objects.equals(id, casted.id)
×
41
        && Objects.equals(type, casted.type)
×
42
        && Objects.equals(name, casted.name);
×
43
  }
44

45
  @Override
46
  public int hashCode() {
47
    return Objects.hash(id, type, name);
×
48
  }
49

50
  @Override
51
  public String toString() {
52
    return "StoragePolicy{"
×
53
        + "id='"
54
        + id
55
        + '\''
56
        + ", "
57
        + "type='"
58
        + type
59
        + '\''
60
        + ", "
61
        + "name='"
62
        + name
63
        + '\''
64
        + "}";
65
  }
66

67
  public static class Builder extends StoragePolicyMini.Builder {
68

69
    protected String name;
70

71
    public Builder(String id) {
72
      super(id);
×
73
    }
×
74

75
    public Builder name(String name) {
76
      this.name = name;
×
77
      return this;
×
78
    }
79

80
    @Override
81
    public Builder type(StoragePolicyMiniTypeField type) {
82
      this.type = new EnumWrapper<StoragePolicyMiniTypeField>(type);
×
83
      return this;
×
84
    }
85

86
    @Override
87
    public Builder type(EnumWrapper<StoragePolicyMiniTypeField> type) {
88
      this.type = type;
×
89
      return this;
×
90
    }
91

92
    public StoragePolicy build() {
NEW
93
      if (this.type == null) {
×
NEW
94
        this.type =
×
95
            new EnumWrapper<StoragePolicyMiniTypeField>(StoragePolicyMiniTypeField.STORAGE_POLICY);
96
      }
97
      return new StoragePolicy(this);
×
98
    }
99
  }
100
}
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