• 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

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

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

11
/**
12
 * Identifies a class by its loader and name rather than by the <code>Class</code> object, which isn't available during
13
 * initial class transformation.
14
 */
15
public final class ClassIdentification {
16
    @Nullable
17
    public final ClassLoader loader;
18
    @NonNull
19
    public final String name;
20

21
    public ClassIdentification(@Nullable ClassLoader loader, @NonNull String name) {
1✔
22
        this.loader = loader;
1✔
23
        this.name = name;
1✔
24
    }
1✔
25

26
    @NonNull
27
    public Class<?> getLoadedClass() {
28
        try {
29
            return Class.forName(name, false, loader);
1✔
30
        } catch (ClassNotFoundException e) {
×
31
            throw new RuntimeException(e);
×
32
        }
33
    }
34

35
    @Override
36
    public boolean equals(Object o) {
37
        if (this == o) {
×
38
            return true;
×
39
        }
40
        if (o == null || getClass() != o.getClass()) {
×
41
            return false;
×
42
        }
43

44
        ClassIdentification other = (ClassIdentification) o;
×
45
        return loader == other.loader && name.equals(other.name);
×
46
    }
47

48
    @Override
49
    public int hashCode() {
50
        return loader == null ? name.hashCode() : 31 * loader.hashCode() + name.hashCode();
1✔
51
    }
52
}
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