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

hazendaz / jmockit1 / 496

15 Nov 2025 05:33PM UTC coverage: 72.192% (-0.008%) from 72.2%
496

push

github

web-flow
Merge pull request #412 from hazendaz/renovate/major-spring-core

Update spring core to v7 (major)

5677 of 8360 branches covered (67.91%)

Branch coverage included in aggregate %.

11922 of 16018 relevant lines covered (74.43%)

0.74 hits per line

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

9.52
/main/src/main/java/mockit/coverage/Configuration.java
1
/*
2
 * MIT License
3
 * Copyright (c) 2006-2025 JMockit developers
4
 * See LICENSE file for full license text.
5
 */
6
package mockit.coverage;
7

8
import edu.umd.cs.findbugs.annotations.NonNull;
9
import edu.umd.cs.findbugs.annotations.Nullable;
10

11
import java.nio.file.Files;
12
import java.nio.file.Path;
13

14
public final class Configuration {
15
    private static final String COVERAGE_PREFIX = "coverage-";
16

17
    private Configuration() {
18
    }
19

20
    @Nullable
21
    public static String getProperty(@NonNull String nameSuffix) {
22
        return getProperty(nameSuffix, null);
1✔
23
    }
24

25
    public static String getProperty(@NonNull String nameSuffix, @Nullable String defaultValue) {
26
        return System.getProperty(COVERAGE_PREFIX + nameSuffix, defaultValue);
1✔
27
    }
28

29
    @Nullable
30
    public static String getOrChooseOutputDirectory(@NonNull String outputDir) {
31
        if (!outputDir.isEmpty()) {
×
32
            return outputDir;
×
33
        }
34

35
        return isTargetSubDirectoryAvailable() ? "target" : null;
×
36
    }
37

38
    private static boolean isTargetSubDirectoryAvailable() {
39
        return System.getProperty("basedir") != null || Files.exists(Path.of("target"));
×
40
    }
41

42
    @NonNull
43
    public static String getOrChooseOutputDirectory(@NonNull String outputDir, @NonNull String defaultDir) {
44
        if (!outputDir.isEmpty()) {
×
45
            return outputDir;
×
46
        }
47

48
        return isTargetSubDirectoryAvailable() ? "target/" + defaultDir : defaultDir;
×
49
    }
50
}
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