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

common-workflow-language / cwljava / #394

31 Oct 2025 04:10PM UTC coverage: 57.972% (-1.6%) from 59.538%
#394

push

github

mr-c
rename package to a namespace that we control

7575 of 12994 new or added lines in 261 files covered. (58.3%)

7752 of 13372 relevant lines covered (57.97%)

0.58 hits per line

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

0.0
/src/main/java/org/commonwl/cwlsdk/cwl1_1/utils/OneOrListOfLoader.java
1
package org.commonwl.cwlsdk.cwl1_1.utils;
2

3
import java.util.ArrayList;
4
import java.util.List;
5
import java.util.Optional;
6

7

8
public class OneOrListOfLoader<T> implements Loader<OneOrListOf<T>> {
9
  private final Loader<T> oneLoader;
10
  private final Loader<List<T>> listLoader;
11

NEW
12
  public OneOrListOfLoader(Loader<T> oneLoader, Loader<List<T>> listLoader) {
×
NEW
13
      this.oneLoader = oneLoader;
×
NEW
14
      this.listLoader = listLoader;
×
NEW
15
  }
×
16

17
  public OneOrListOf<T> load(
18
      final Object doc,
19
      final String baseUri,
20
      final LoadingOptions loadingOptions,
21
      final String docRoot) {
NEW
22
    final List<ValidationException> errors = new ArrayList();
×
23
    try {
NEW
24
      return OneOrListOf.oneOf(this.oneLoader.load(doc, baseUri, loadingOptions, docRoot));
×
NEW
25
    } catch (ValidationException e) {
×
NEW
26
      errors.add(e);
×
27
    }
28
    try {
NEW
29
      return OneOrListOf.listOf(this.listLoader.load(doc, baseUri, loadingOptions, docRoot));
×
NEW
30
    } catch (ValidationException e) {
×
NEW
31
      errors.add(e);
×
32
    }
NEW
33
    throw new ValidationException("Failed to one or list of of type", errors);
×
34
  }
35
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc