File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed 
src/test/java/com/fasterxml/jackson/dataformat/xml Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -230,15 +230,18 @@ protected static XmlMapper.Builder mapperBuilder() {
230230        return  XmlMapper .builder ();
231231    }
232232
233+     protected  static  XmlMapper .Builder  mapperBuilder (boolean  useListWrapping ) {
234+         return  XmlMapper .builder ()
235+                 .defaultUseWrapper (useListWrapping );
236+     }
237+ 
233238    protected  static  XmlMapper .Builder  mapperBuilder (XmlFactory  f ) {
234239        return  XmlMapper .builder (f );
235240    }
236241
237242    protected  XmlMapper  xmlMapper (boolean  useListWrapping )
238243    {
239-         JacksonXmlModule  module  = new  JacksonXmlModule ();
240-         module .setDefaultUseWrapper (useListWrapping );
241-         return  new  XmlMapper (module );
244+         return  mapperBuilder (useListWrapping ).build ();
242245    }
243246
244247    protected  AnnotationIntrospector  jakartaXMLBindAnnotationIntrospector () {
Original file line number Diff line number Diff line change @@ -349,15 +349,15 @@ public void testBuilderMethodReturnMoreGeneral() throws Exception
349349    @ Test 
350350    public  void  testBuilderMethodReturnMoreSpecific () throws  Exception 
351351    {
352-         final  String  json  = "<ValueInterface2><x>1</x></ValueInterface2>} " ;
352+         final  String  json  = "<ValueInterface2><x>1</x></ValueInterface2>" ;
353353        ValueInterface2  value  = MAPPER .readValue (json , ValueInterface2 .class );
354354        assertEquals (2 , value .getX ());
355355    }
356356
357357    @ Test 
358358    public  void  testSelfBuilder777 () throws  Exception 
359359    {
360-         SelfBuilder777  result  = MAPPER .readValue ("<SelfBuilder777><x>3</x></SelfBuilder777>' " ,
360+         SelfBuilder777  result  = MAPPER .readValue ("<SelfBuilder777><x>3</x></SelfBuilder777>" ,
361361                SelfBuilder777 .class );
362362        assertNotNull (result );
363363        assertEquals (3 , result .x );
Original file line number Diff line number Diff line change @@ -28,9 +28,8 @@ public void testSimpleRead() throws Exception
2828        assertEquals (sr .next (), XMLStreamConstants .START_ELEMENT );
2929        assertEquals ("root" , sr .getLocalName ());
3030
31-         /* 30-May-2014, tatu: This is bit tricky... need to ensure that currently 
32-          *    pointed to START_ELEMENT is sort of re-read. 
33-          */ 
31+         // 30-May-2014, tatu: This is bit tricky... need to ensure that currently 
32+         //    pointed to START_ELEMENT is sort of re-read. 
3433        assertEquals (sr .next (), XMLStreamConstants .START_ELEMENT );
3534        assertEquals ("NameBean" , sr .getLocalName ());
3635
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments