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

common-workflow-language / cwljava / #336

29 Jan 2025 12:41PM UTC coverage: 60.005% (-2.2%) from 62.203%
#336

Pull #192

github

web-flow
Merge 40f1ed817 into e28b918d2
Pull Request #192: regenerate using latest schema & schema-salad-tool

441 of 968 new or added lines in 65 files covered. (45.56%)

21 existing lines in 3 files now uncovered.

7347 of 12244 relevant lines covered (60.0%)

0.6 hits per line

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

0.0
/src/main/java/org/w3id/cwl/cwl1_1/utils/OneOrListOfLoader.java
1
package org.w3id.cwl.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 · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc