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

alibaba / jetcache / #405

16 Apr 2024 05:58AM UTC coverage: 0.0% (-88.9%) from 88.866%
#405

push

areyouok
add encoding to fix coverage report

0 of 5353 relevant lines covered (0.0%)

0.0 hits per line

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

0.0
/jetcache-anno/src/main/java/com/alicp/jetcache/anno/support/DefaultKeyConvertorParser.java
1
/**
2
 * Created on 2019/6/7.
3
 */
4
package com.alicp.jetcache.anno.support;
5

6
import com.alicp.jetcache.CacheConfigException;
7
import com.alicp.jetcache.anno.KeyConvertor;
8
import com.alicp.jetcache.support.Fastjson2KeyConvertor;
9
import com.alicp.jetcache.support.FastjsonKeyConvertor;
10
import com.alicp.jetcache.support.JacksonKeyConvertor;
11

12
import java.util.function.Function;
13

14
/**
15
 * @author huangli
16
 */
17
public class DefaultKeyConvertorParser implements KeyConvertorParser {
×
18
    @Override
19
    public Function<Object, Object> parseKeyConvertor(String convertor) {
20
        if (convertor == null) {
×
21
            return null;
×
22
        }
23
        if (KeyConvertor.FASTJSON.equalsIgnoreCase(convertor)) {
×
24
            return FastjsonKeyConvertor.INSTANCE;
×
25
        } else if (KeyConvertor.FASTJSON2.equalsIgnoreCase(convertor)) {
×
26
            return Fastjson2KeyConvertor.INSTANCE;
×
27
        } else if (KeyConvertor.JACKSON.equalsIgnoreCase(convertor)) {
×
28
            return JacksonKeyConvertor.INSTANCE;
×
29
        } else if (KeyConvertor.NONE.equalsIgnoreCase(convertor)) {
×
30
            return KeyConvertor.NONE_INSTANCE;
×
31
        }
32
        throw new CacheConfigException("not supported:" + convertor);
×
33
    }
34
}
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

© 2025 Coveralls, Inc