@@ -21,37 +21,31 @@ public class JdkDeserializers
21
21
StackTraceElement .class ,
22
22
ByteBuffer .class
23
23
};
24
- for (Class <?> cls : types ) {
25
- _classNames .add (cls .getName ());
26
- }
27
- for (Class <?> cls : FromStringDeserializer .types ()) {
28
- _classNames .add (cls .getName ());
29
- }
24
+ for (Class <?> cls : types ) { _classNames .add (cls .getName ()); }
25
+ for (Class <?> cls : FromStringDeserializer .types ()) { _classNames .add (cls .getName ()); }
30
26
}
31
27
32
28
public static JsonDeserializer <?> find (Class <?> rawType , String clsName )
33
29
{
34
- if (!_classNames .contains (clsName )) {
35
- return null ;
36
- }
37
- JsonDeserializer <?> d = FromStringDeserializer .findDeserializer (rawType );
38
- if (d != null ) {
39
- return d ;
40
- }
41
- if (rawType == UUID .class ) {
42
- return new UUIDDeserializer ();
43
- }
44
- if (rawType == StackTraceElement .class ) {
45
- return new StackTraceElementDeserializer ();
46
- }
47
- if (rawType == AtomicBoolean .class ) {
48
- // (note: AtomicInteger/Long work due to single-arg constructor. For now?
49
- return new AtomicBooleanDeserializer ();
50
- }
51
- if (rawType == ByteBuffer .class ) {
52
- return new ByteBufferDeserializer ();
53
- }
54
- // should never occur
55
- throw new IllegalArgumentException ("Internal error: can't find deserializer for " +clsName );
30
+ if (_classNames .contains (clsName )) {
31
+ JsonDeserializer <?> d = FromStringDeserializer .findDeserializer (rawType );
32
+ if (d != null ) {
33
+ return d ;
34
+ }
35
+ if (rawType == UUID .class ) {
36
+ return new UUIDDeserializer ();
37
+ }
38
+ if (rawType == StackTraceElement .class ) {
39
+ return new StackTraceElementDeserializer ();
40
+ }
41
+ if (rawType == AtomicBoolean .class ) {
42
+ // (note: AtomicInteger/Long work due to single-arg constructor. For now?
43
+ return new AtomicBooleanDeserializer ();
44
+ }
45
+ if (rawType == ByteBuffer .class ) {
46
+ return new ByteBufferDeserializer ();
47
+ }
48
+ }
49
+ return null ;
56
50
}
57
51
}
0 commit comments