3
3
import javax .xml .namespace .QName ;
4
4
5
5
import com .fasterxml .jackson .databind .*;
6
- import com .fasterxml .jackson .databind .cfg .MapperConfig ;
7
6
import com .fasterxml .jackson .databind .introspect .AnnotatedClass ;
8
7
import com .fasterxml .jackson .databind .type .ClassKey ;
9
8
import com .fasterxml .jackson .databind .util .SimpleLookupCache ;
9
+
10
10
import com .fasterxml .jackson .dataformat .xml .XmlAnnotationIntrospector ;
11
11
12
12
/**
@@ -37,11 +37,11 @@ protected Object readResolve() {
37
37
return this ;
38
38
}
39
39
40
- public QName findRootName (JavaType rootType , MapperConfig <?> config ) {
41
- return findRootName (rootType .getRawClass (), config );
40
+ public QName findRootName (DatabindContext ctxt , JavaType rootType ) {
41
+ return findRootName (ctxt , rootType .getRawClass ());
42
42
}
43
43
44
- public QName findRootName (Class <?> rootType , MapperConfig <?> config )
44
+ public QName findRootName (DatabindContext ctxt , Class <?> rootType )
45
45
{
46
46
ClassKey key = new ClassKey (rootType );
47
47
QName name ;
@@ -51,19 +51,17 @@ public QName findRootName(Class<?> rootType, MapperConfig<?> config)
51
51
if (name != null ) {
52
52
return name ;
53
53
}
54
- name = _findRootName (rootType , config );
54
+ name = _findRootName (ctxt , rootType );
55
55
synchronized (_rootNames ) {
56
56
_rootNames .put (key , name );
57
57
}
58
58
return name ;
59
59
}
60
-
61
- // NOTE: needed to be synchronized in 2.6.4, but 2.7.0 adds a proper fix
62
- // for annotation introspection hence not needed any more
63
- protected QName _findRootName (Class <?> rootType , MapperConfig <?> config )
60
+
61
+ protected QName _findRootName (DatabindContext ctxt , Class <?> rootType )
64
62
{
65
- final AnnotatedClass ac = config .introspectClassAnnotations (rootType );
66
- final AnnotationIntrospector intr = config .getAnnotationIntrospector ();
63
+ final AnnotatedClass ac = ctxt .introspectClassAnnotations (rootType );
64
+ final AnnotationIntrospector intr = ctxt .getAnnotationIntrospector ();
67
65
String localName = null ;
68
66
String ns = null ;
69
67
0 commit comments