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

box / box-java-sdk / #6758

28 Apr 2026 08:14AM UTC coverage: 12.64% (-0.02%) from 12.66%
#6758

Pull #1807

github

web-flow
Merge 90e10121a into 626d2d18e
Pull Request #1807: docs(boxsdkgen): add documentation about default timeout (box/box-codegen#944)

0 of 105 new or added lines in 13 files covered. (0.0%)

18 existing lines in 13 files now uncovered.

8374 of 66251 relevant lines covered (12.64%)

0.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/com/box/sdkgen/internal/OneOfTwo.java
1
package com.box.sdkgen.internal;
2

3
import com.box.sdkgen.serialization.json.JsonManager;
4
import com.fasterxml.jackson.core.JsonGenerator;
5
import com.fasterxml.jackson.databind.JsonSerializer;
6
import com.fasterxml.jackson.databind.ObjectMapper;
7
import com.fasterxml.jackson.databind.SerializerProvider;
8
import java.io.IOException;
9

10
public class OneOfTwo<T0, T1> extends SerializableObject implements OneOfUnion {
11
  protected static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
×
12
  protected T0 value0;
13
  protected T1 value1;
14

15
  public OneOfTwo(T0 value0, T1 value1) {
×
16
    this.value0 = value0;
×
17
    this.value1 = value1;
×
18
  }
×
19

20
  @Override
21
  public boolean hasAnyNonNullValue() {
NEW
22
    return value0 != null || value1 != null;
×
23
  }
24

25
  public static class OneOfTwoSerializer extends JsonSerializer<OneOfTwo<?, ?>> {
26

27
    public OneOfTwoSerializer() {
28
      super();
×
29
    }
×
30

31
    @Override
32
    public void serialize(
33
        OneOfTwo<?, ?> itemEntryField, JsonGenerator gen, SerializerProvider provider)
34
        throws IOException {
35
      if (itemEntryField.value0 != null) {
×
36
        JsonManager.WRITER.writeValue(gen, itemEntryField.value0);
×
NEW
37
        return;
×
38
      }
39
      if (itemEntryField.value1 != null) {
×
40
        JsonManager.WRITER.writeValue(gen, itemEntryField.value1);
×
NEW
41
        return;
×
42
      }
NEW
43
      gen.writeNull();
×
UNCOV
44
    }
×
45
  }
46
}
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