@@ -12,7 +12,7 @@ public class JsoniterSpi {
1212 private static Config defaultConfig ;
1313 private static List <Extension > extensions = new ArrayList <Extension >();
1414 private static Map <Class , Class > typeImpls = new HashMap <Class , Class >();
15- private static Map <Type , MapKeyDecoder > globalMapKeyDecoders = new HashMap <Type , MapKeyDecoder >();
15+ private static Map <Type , Decoder > globalMapKeyDecoders = new HashMap <Type , Decoder >();
1616 private static Map <Type , Encoder > globalMapKeyEncoders = new HashMap <Type , Encoder >();
1717 private static Map <Type , Decoder > globalTypeDecoders = new HashMap <Type , Decoder >();
1818 private static Map <Type , Encoder > globalTypeEncoders = new HashMap <Type , Encoder >();
@@ -28,7 +28,7 @@ protected Config initialValue() {
2828 };
2929 private static volatile Map <Object , String > configNames = new HashMap <Object , String >();
3030 private static volatile Map <String , Encoder > mapKeyEncoders = new HashMap <String , Encoder >();
31- private static volatile Map <String , MapKeyDecoder > mapKeyDecoders = new HashMap <String , MapKeyDecoder >();
31+ private static volatile Map <String , Decoder > mapKeyDecoders = new HashMap <String , Decoder >();
3232 private static volatile Map <String , Encoder > encoders = new HashMap <String , Encoder >();
3333 private static volatile Map <String , Decoder > decoders = new HashMap <String , Decoder >();
3434 private static volatile Map <Class , Extension > objectFactories = new HashMap <Class , Extension >();
@@ -98,7 +98,7 @@ public static List<Extension> getExtensions() {
9898 return combined ;
9999 }
100100
101- public static void registerMapKeyDecoder (Type mapKeyType , MapKeyDecoder mapKeyDecoder ) {
101+ public static void registerMapKeyDecoder (Type mapKeyType , Decoder mapKeyDecoder ) {
102102 globalMapKeyDecoders .put (mapKeyType , mapKeyDecoder );
103103 copyGlobalMapKeyDecoder (getCurrentConfig ().configName (), mapKeyType , mapKeyDecoder );
104104 }
@@ -159,7 +159,7 @@ public static void registerPropertyEncoder(TypeLiteral typeLiteral, String prope
159159 // === copy from global to current ===
160160
161161 private static void copyGlobalSettings (String configName ) {
162- for (Map .Entry <Type , MapKeyDecoder > entry : globalMapKeyDecoders .entrySet ()) {
162+ for (Map .Entry <Type , Decoder > entry : globalMapKeyDecoders .entrySet ()) {
163163 copyGlobalMapKeyDecoder (configName , entry .getKey (), entry .getValue ());
164164 }
165165 for (Map .Entry <Type , Encoder > entry : globalMapKeyEncoders .entrySet ()) {
@@ -196,7 +196,7 @@ private static void copyGlobalTypeDecoder(String configName, Type type, Decoder
196196 addNewDecoder (TypeLiteral .create (type ).getDecoderCacheKey (configName ), typeDecoder );
197197 }
198198
199- private static void copyGlobalMapKeyDecoder (String configName , Type mapKeyType , MapKeyDecoder mapKeyDecoder ) {
199+ private static void copyGlobalMapKeyDecoder (String configName , Type mapKeyType , Decoder mapKeyDecoder ) {
200200 addNewMapDecoder (TypeLiteral .create (mapKeyType ).getDecoderCacheKey (configName ), mapKeyDecoder );
201201 }
202202
@@ -216,13 +216,13 @@ public static String getMapKeyDecoderCacheKey(Type mapKeyType) {
216216
217217 // === current ===
218218
219- public synchronized static void addNewMapDecoder (String cacheKey , MapKeyDecoder mapKeyDecoder ) {
220- HashMap <String , MapKeyDecoder > newCache = new HashMap <String , MapKeyDecoder >(mapKeyDecoders );
219+ public synchronized static void addNewMapDecoder (String cacheKey , Decoder mapKeyDecoder ) {
220+ HashMap <String , Decoder > newCache = new HashMap <String , Decoder >(mapKeyDecoders );
221221 newCache .put (cacheKey , mapKeyDecoder );
222222 mapKeyDecoders = newCache ;
223223 }
224224
225- public static MapKeyDecoder getMapKeyDecoder (String cacheKey ) {
225+ public static Decoder getMapKeyDecoder (String cacheKey ) {
226226 return mapKeyDecoders .get (cacheKey );
227227 }
228228
0 commit comments