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

box / box-java-sdk / #6860

29 Apr 2026 07:03PM UTC coverage: 34.624% (-0.4%) from 35.045%
#6860

push

github

web-flow
feat: Automate Public API (box/box-openapi#594) (#1820)

19 of 542 new or added lines in 19 files covered. (3.51%)

246 existing lines in 21 files now uncovered.

19116 of 55210 relevant lines covered (34.62%)

0.35 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/OneOfEight.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 OneOfEight<T0, T1, T2, T3, T4, T5, T6, T7> extends SerializableObject
11
    implements OneOfUnion {
UNCOV
12
  protected static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
×
13
  protected T0 value0;
14
  protected T1 value1;
15
  protected T2 value2;
16
  protected T3 value3;
17
  protected T4 value4;
18
  protected T5 value5;
19
  protected T6 value6;
20
  protected T7 value7;
21

22
  public OneOfEight(
23
      T0 value0, T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7) {
×
24
    this.value0 = value0;
×
25
    this.value1 = value1;
×
26
    this.value2 = value2;
×
27
    this.value3 = value3;
×
28
    this.value4 = value4;
×
29
    this.value5 = value5;
×
30
    this.value6 = value6;
×
31
    this.value7 = value7;
×
UNCOV
32
  }
×
33

34
  @Override
35
  public boolean hasAnyNonNullValue() {
UNCOV
36
    return value0 != null
×
37
        || value1 != null
38
        || value2 != null
39
        || value3 != null
40
        || value4 != null
41
        || value5 != null
42
        || value6 != null
43
        || value7 != null;
44
  }
45

46
  public static class OneOfEightSerializer
47
      extends JsonSerializer<OneOfEight<?, ?, ?, ?, ?, ?, ?, ?>> {
48

49
    public OneOfEightSerializer() {
50
      super();
×
UNCOV
51
    }
×
52

53
    @Override
54
    public void serialize(
55
        OneOfEight<?, ?, ?, ?, ?, ?, ?, ?> itemEntryField,
56
        JsonGenerator gen,
57
        SerializerProvider provider)
58
        throws IOException {
59
      if (itemEntryField.value0 != null) {
×
UNCOV
60
        JsonManager.WRITER.writeValue(gen, itemEntryField.value0);
×
61
        return;
×
62
      }
UNCOV
63
      if (itemEntryField.value1 != null) {
×
64
        JsonManager.WRITER.writeValue(gen, itemEntryField.value1);
×
65
        return;
×
66
      }
67
      if (itemEntryField.value2 != null) {
×
68
        JsonManager.WRITER.writeValue(gen, itemEntryField.value2);
×
UNCOV
69
        return;
×
70
      }
UNCOV
71
      if (itemEntryField.value3 != null) {
×
UNCOV
72
        JsonManager.WRITER.writeValue(gen, itemEntryField.value3);
×
UNCOV
73
        return;
×
74
      }
UNCOV
75
      if (itemEntryField.value4 != null) {
×
UNCOV
76
        JsonManager.WRITER.writeValue(gen, itemEntryField.value4);
×
UNCOV
77
        return;
×
78
      }
UNCOV
79
      if (itemEntryField.value5 != null) {
×
UNCOV
80
        JsonManager.WRITER.writeValue(gen, itemEntryField.value5);
×
UNCOV
81
        return;
×
82
      }
UNCOV
83
      if (itemEntryField.value6 != null) {
×
UNCOV
84
        JsonManager.WRITER.writeValue(gen, itemEntryField.value6);
×
UNCOV
85
        return;
×
86
      }
UNCOV
87
      if (itemEntryField.value7 != null) {
×
UNCOV
88
        JsonManager.WRITER.writeValue(gen, itemEntryField.value7);
×
UNCOV
89
        return;
×
90
      }
UNCOV
91
      gen.writeNull();
×
UNCOV
92
    }
×
93
  }
94
}
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