• 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

0.0
/main/src/main/java/mockit/coverage/DataFileMerging.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

10
import java.io.File;
11
import java.io.IOException;
12
import java.nio.file.Path;
13
import java.util.ArrayList;
14
import java.util.List;
15

16
import mockit.coverage.data.CoverageData;
17

18
final class DataFileMerging {
19
    @NonNull
20
    private final List<File> inputFiles;
21

22
    DataFileMerging(@NonNull String[] inputPaths) {
×
23
        inputFiles = new ArrayList<>(inputPaths.length);
×
24

25
        for (String path : inputPaths) {
×
26
            addInputFileToList(path.trim());
×
27
        }
28
    }
×
29

30
    private void addInputFileToList(@NonNull String path) {
31
        if (!path.isEmpty()) {
×
32
            File inputFile = Path.of(path).toFile();
×
33

34
            if (inputFile.isDirectory()) {
×
35
                inputFile = inputFile.toPath().resolve("coverage.ser").toFile();
×
36
            }
37

38
            inputFiles.add(inputFile);
×
39
        }
40
    }
×
41

42
    @NonNull
43
    CoverageData merge() throws IOException {
44
        CoverageData mergedData = null;
×
45

46
        for (File inputFile : inputFiles) {
×
47
            if (inputFile.exists()) {
×
48
                CoverageData existingData = CoverageData.readDataFromFile(inputFile);
×
49

50
                if (mergedData == null) {
×
51
                    mergedData = existingData;
×
52
                } else {
53
                    mergedData.merge(existingData);
×
54
                }
55
            }
56
        }
×
57

58
        if (mergedData == null) {
×
59
            throw new IllegalArgumentException("No input \"coverage.ser\" files found");
×
60
        }
61

62
        return mergedData;
×
63
    }
64
}
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