• 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/reporting/ListOfCallPoints.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.reporting;
7

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

11
import java.util.List;
12
import java.util.regex.Pattern;
13

14
import mockit.coverage.CallPoint;
15

16
public final class ListOfCallPoints {
17
    @NonNull
18
    private static final String EOL = System.lineSeparator();
×
19
    private static final Pattern LESS_THAN_CHAR = Pattern.compile("<");
×
20

21
    @NonNull
22
    private final StringBuilder content;
23

24
    public ListOfCallPoints() {
×
25
        content = new StringBuilder(100);
×
26
    }
×
27

28
    public void insertListOfCallPoints(@Nullable List<CallPoint> callPoints) {
29
        if (content.length() == 0) {
×
30
            content.append(EOL).append("      ");
×
31
        }
32

33
        content.append("  <ol style='display:none'>");
×
34

35
        if (callPoints == null) {
×
36
            content.append("</ol>").append(EOL).append("      ");
×
37
            return;
×
38
        }
39

40
        content.append(EOL);
×
41

42
        CallPoint currentCP = callPoints.get(0);
×
43
        appendTestMethod(currentCP.getStackTraceElement());
×
44
        appendRepetitionCountIfNeeded(currentCP);
×
45

46
        for (int i = 1, n = callPoints.size(); i < n; i++) {
×
47
            CallPoint nextCP = callPoints.get(i);
×
48
            StackTraceElement ste = nextCP.getStackTraceElement();
×
49

50
            if (nextCP.isSameTestMethod(currentCP)) {
×
51
                content.append(", ").append(ste.getLineNumber());
×
52
            } else {
53
                content.append("</li>").append(EOL);
×
54
                appendTestMethod(ste);
×
55
            }
56

57
            appendRepetitionCountIfNeeded(nextCP);
×
58
            currentCP = nextCP;
×
59
        }
60

61
        content.append("</li>").append(EOL).append("        </ol>").append(EOL).append("      ");
×
62
    }
×
63

64
    private void appendTestMethod(@NonNull StackTraceElement current) {
65
        content.append("          <li>");
×
66
        content.append(current.getClassName()).append('#');
×
67
        content.append(LESS_THAN_CHAR.matcher(current.getMethodName()).replaceFirst("&lt;")).append(": ");
×
68
        content.append(current.getLineNumber());
×
69
    }
×
70

71
    private void appendRepetitionCountIfNeeded(@NonNull CallPoint callPoint) {
72
        int repetitionCount = callPoint.getRepetitionCount();
×
73

74
        if (repetitionCount > 0) {
×
75
            content.append('x').append(1 + repetitionCount);
×
76
        }
77
    }
×
78

79
    @NonNull
80
    public String getContents() {
81
        String result = content.toString();
×
82
        content.setLength(0);
×
83
        return result;
×
84
    }
85
}
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