• 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/box/ccgauth/CCGConfig.java
1
package com.box.sdkgen.box.ccgauth;
2

3
import com.box.sdkgen.box.tokenstorage.InMemoryTokenStorage;
4
import com.box.sdkgen.box.tokenstorage.TokenStorage;
5

6
public class CCGConfig {
7

8
  /** Box API key used for identifying the application the user is authenticating with */
9
  public final String clientId;
10

11
  /** Box API secret used for making auth requests. */
12
  public final String clientSecret;
13

14
  /** The ID of the Box Developer Edition enterprise. */
15
  public String enterpriseId;
16

17
  /**
18
   * The user id to authenticate. This value is not required. But if it is provided, then the user
19
   * will be auto-authenticated at the time of the first API call.
20
   */
21
  public String userId;
22

23
  /**
24
   * Object responsible for storing token. If no custom implementation provided,the token will be
25
   * stored in memory.
26
   */
27
  public TokenStorage tokenStorage;
28

29
  public CCGConfig(String clientId, String clientSecret) {
×
30
    this.clientId = clientId;
×
31
    this.clientSecret = clientSecret;
×
32
    this.tokenStorage = new InMemoryTokenStorage();
×
33
  }
×
34

35
  protected CCGConfig(Builder builder) {
×
36
    this.clientId = builder.clientId;
×
37
    this.clientSecret = builder.clientSecret;
×
38
    this.enterpriseId = builder.enterpriseId;
×
39
    this.userId = builder.userId;
×
40
    this.tokenStorage = builder.tokenStorage;
×
41
  }
×
42

43
  public String getClientId() {
44
    return clientId;
×
45
  }
46

47
  public String getClientSecret() {
48
    return clientSecret;
×
49
  }
50

51
  public String getEnterpriseId() {
52
    return enterpriseId;
×
53
  }
54

55
  public String getUserId() {
56
    return userId;
×
57
  }
58

59
  public TokenStorage getTokenStorage() {
60
    return tokenStorage;
×
61
  }
62

63
  public static class Builder {
64

65
    protected final String clientId;
66

67
    protected final String clientSecret;
68

69
    protected String enterpriseId;
70

71
    protected String userId;
72

73
    protected TokenStorage tokenStorage;
74

75
    public Builder(String clientId, String clientSecret) {
×
76
      this.clientId = clientId;
×
77
      this.clientSecret = clientSecret;
×
78
    }
×
79

80
    public Builder enterpriseId(String enterpriseId) {
81
      this.enterpriseId = enterpriseId;
×
UNCOV
82
      return this;
×
83
    }
84

85
    public Builder userId(String userId) {
86
      this.userId = userId;
×
UNCOV
87
      return this;
×
88
    }
89

90
    public Builder tokenStorage(TokenStorage tokenStorage) {
91
      this.tokenStorage = tokenStorage;
×
UNCOV
92
      return this;
×
93
    }
94

95
    public CCGConfig build() {
NEW
96
      if (this.tokenStorage == null) {
×
NEW
97
        this.tokenStorage = new InMemoryTokenStorage();
×
98
      }
UNCOV
99
      return new CCGConfig(this);
×
100
    }
101
  }
102
}
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