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

box / box-java-sdk-gen / #226

20 Jun 2025 03:14PM UTC coverage: 35.609% (-0.2%) from 35.816%
#226

push

github

web-flow
feat: Shorten builder names in Java (box/box-codegen#742) (#334)

367 of 1570 new or added lines in 984 files covered. (23.38%)

674 existing lines in 370 files now uncovered.

16125 of 45284 relevant lines covered (35.61%)

0.36 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/oauth2error/OAuth2Error.java
1
package com.box.sdkgen.schemas.oauth2error;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.fasterxml.jackson.annotation.JsonProperty;
5
import java.util.Objects;
6

7
public class OAuth2Error extends SerializableObject {
8

9
  protected String error;
10

11
  @JsonProperty("error_description")
12
  protected String errorDescription;
13

14
  public OAuth2Error() {
15
    super();
×
16
  }
×
17

18
  protected OAuth2Error(Builder builder) {
19
    super();
×
20
    this.error = builder.error;
×
21
    this.errorDescription = builder.errorDescription;
×
22
  }
×
23

24
  public String getError() {
25
    return error;
×
26
  }
27

28
  public String getErrorDescription() {
29
    return errorDescription;
×
30
  }
31

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

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

50
  @Override
51
  public String toString() {
52
    return "OAuth2Error{"
×
53
        + "error='"
54
        + error
55
        + '\''
56
        + ", "
57
        + "errorDescription='"
58
        + errorDescription
59
        + '\''
60
        + "}";
61
  }
62

NEW
63
  public static class Builder {
×
64

65
    protected String error;
66

67
    protected String errorDescription;
68

69
    public Builder error(String error) {
70
      this.error = error;
×
71
      return this;
×
72
    }
73

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

79
    public OAuth2Error build() {
80
      return new OAuth2Error(this);
×
81
    }
82
  }
83
}
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