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

hazendaz / jmockit1 / 85

26 Apr 2025 06:37PM UTC coverage: 73.285% (-0.02%) from 73.308%
85

push

github

web-flow
Merge pull request #327 from hazendaz/paths

Use nio more per modernizer and update more tests to junit 5

5625 of 8178 branches covered (68.78%)

Branch coverage included in aggregate %.

5 of 43 new or added lines in 14 files covered. (11.63%)

3 existing lines in 3 files now uncovered.

11885 of 15715 relevant lines covered (75.63%)

0.76 hits per line

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

0.0
/main/src/main/java/mockit/coverage/AccretionFile.java
1
/*
2
 * Copyright (c) 2006 JMockit developers
3
 * This file is subject to the terms of the MIT license (see LICENSE.txt).
4
 */
5
package mockit.coverage;
6

7
import edu.umd.cs.findbugs.annotations.NonNull;
8

9
import java.io.File;
10
import java.io.IOException;
11
import java.nio.file.Path;
12

13
import mockit.coverage.data.CoverageData;
14

15
import org.slf4j.Logger;
16
import org.slf4j.LoggerFactory;
17

18
final class AccretionFile {
19

20
    /** The logger. */
21
    private static final Logger logger = LoggerFactory.getLogger(AccretionFile.class);
×
22

23
    @NonNull
24
    private final File outputFile;
25
    @NonNull
26
    private final CoverageData newData;
27

28
    AccretionFile(@NonNull String outputDir, @NonNull CoverageData newData) {
×
29
        String parentDir = Configuration.getOrChooseOutputDirectory(outputDir);
×
NEW
30
        outputFile = Path.of(parentDir, "coverage.ser").toFile();
×
31

32
        newData.fillLastModifiedTimesForAllClassFiles();
×
33
        this.newData = newData;
×
34
    }
×
35

36
    void mergeDataFromExistingFileIfAny() throws IOException {
37
        if (outputFile.exists()) {
×
38
            CoverageData previousData = CoverageData.readDataFromFile(outputFile);
×
39
            newData.merge(previousData);
×
40
        }
41
    }
×
42

43
    void generate() throws IOException {
44
        newData.writeDataToFile(outputFile);
×
45
        logger.info("JMockit: Coverage data written to {}", outputFile.getCanonicalPath());
×
46
    }
×
47
}
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