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

alibaba / jetcache / #448

23 May 2026 01:38PM UTC coverage: 89.341% (+0.4%) from 88.921%
#448

push

areyouok
fix: init fail if Kryo not in classpath

0 of 4 new or added lines in 1 file covered. (0.0%)

27 existing lines in 9 files now uncovered.

5029 of 5629 relevant lines covered (89.34%)

0.89 hits per line

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

68.42
/jetcache-core/src/main/java/com/alicp/jetcache/support/KryoClassResolverUtil.java
1
package com.alicp.jetcache.support;
2

3
final class KryoClassResolverUtil {
×
4

5
    private static final String[] PRIMITIVE_TYPE_NAMES = {
1✔
6
            "boolean", "byte", "char", "short", "int", "long", "float", "double", "void"
7
    };
8

9
    static void checkAllowed(Class<?> type, DecodeFilter decodeFilter) {
10
        if (type != null && !type.isPrimitive()) {
1✔
11
            checkAllowed(type.getName(), decodeFilter);
1✔
12
        }
13
    }
1✔
14

15
    static void checkAllowed(String className, DecodeFilter decodeFilter) {
16
        if (isPrimitiveTypeName(className)) {
1✔
17
            return;
×
18
        }
19
        if (decodeFilter.isEnabled() && !decodeFilter.isAllowed(className)) {
1✔
20
            throw new DecodeFilterException(className);
1✔
21
        }
22
    }
1✔
23

24
    static Class<?> loadClass(String className, ClassLoader primary, ClassLoader fallback) throws ClassNotFoundException {
25
        try {
26
            return Class.forName(className, false, primary);
1✔
UNCOV
27
        } catch (ClassNotFoundException e) {
×
28
            return Class.forName(className, false, fallback);
×
29
        }
30
    }
31

32
    private static boolean isPrimitiveTypeName(String className) {
33
        if (className == null) {
1✔
UNCOV
34
            return false;
×
35
        }
36
        for (String primitiveTypeName : PRIMITIVE_TYPE_NAMES) {
1✔
37
            if (primitiveTypeName.equals(className)) {
1✔
UNCOV
38
                return true;
×
39
            }
40
        }
41
        return false;
1✔
42
    }
43
}
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