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

common-workflow-language / cwlviewer / #1809

31 Mar 2025 07:07AM CUT coverage: 70.306%. Remained the same
#1809

Pull #695

github

kinow
Add missing license header
Pull Request #695: Add missing license header

1700 of 2418 relevant lines covered (70.31%)

0.7 hits per line

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

0.0
/src/main/java/org/commonwl/view/util/StreamGobbler.java
1
/*
2
 * Licensed to the Apache Software Foundation (ASF) under one
3
 * or more contributor license agreements.  See the NOTICE file
4
 * distributed with this work for additional information
5
 * regarding copyright ownership.  The ASF licenses this file
6
 * to you under the Apache License, Version 2.0 (the
7
 * "License"); you may not use this file except in compliance
8
 * with the License.  You may obtain a copy of the License at
9
 *
10
 *   http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing,
13
 * software distributed under the License is distributed on an
14
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
 * KIND, either express or implied.  See the License for the
16
 * specific language governing permissions and limitations
17
 * under the License.
18
 */
19

20
package org.commonwl.view.util;
21

22
import java.io.BufferedReader;
23
import java.io.IOException;
24
import java.io.InputStream;
25
import java.io.InputStreamReader;
26

27
/** Background thread to consume stream and collect contents */
28
public class StreamGobbler extends Thread {
29
  private final String lineSeparator = System.getProperty("line.separator");
×
30

31
  private InputStream is;
32
  private String content = "";
×
33

34
  public StreamGobbler(InputStream is) {
×
35
    this.is = is;
×
36
  }
×
37

38
  public void run() {
39
    try {
40
      InputStreamReader isr = new InputStreamReader(is);
×
41
      BufferedReader br = new BufferedReader(isr);
×
42
      String line;
43
      while ((line = br.readLine()) != null) {
×
44
        content += line + lineSeparator;
×
45
      }
46
    } catch (IOException ex) {
×
47
      ex.printStackTrace();
×
48
    }
×
49
  }
×
50

51
  public String getContent() {
52
    return content;
×
53
  }
54
}
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

© 2025 Coveralls, Inc