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

torand / openapi2java / 15494024830

06 Jun 2025 03:23PM UTC coverage: 82.388%. First build
15494024830

push

github

torand
refactor: replace util package with dep

503 of 716 branches covered (70.25%)

Branch coverage included in aggregate %.

7 of 14 new or added lines in 5 files covered. (50.0%)

1415 of 1612 relevant lines covered (87.78%)

4.77 hits per line

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

46.15
/src/main/java/io/github/torand/openapi2java/utils/StringUtils.java
1
/*
2
 * Copyright (c) 2024-2025 Tore Eide Andersen
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *      http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package io.github.torand.openapi2java.utils;
17

18
import java.util.List;
19

20
import static io.github.torand.javacommons.collection.CollectionHelper.isEmpty;
21
import static io.github.torand.javacommons.lang.StringHelper.isBlank;
22

23
public class StringUtils {
24
    private StringUtils() {}
25

26
    public static String pluralSuffix(int count) {
27
        return count == 1 ? "" : "s";
7✔
28
    }
29

30
    public static String removeLineBreaks(String value) {
NEW
31
        if (isBlank(value)) {
×
NEW
32
            return value;
×
33
        }
NEW
34
        return value.replaceAll("\\n", " ");
×
35
    }
36

37
    public static String joinCsv(List<String> values) {
38
        if (isEmpty(values)) {
3!
NEW
39
            return "";
×
40
        }
41

42
        return String.join(", ", values);
4✔
43
    }
44
}
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