File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed 
src/test/java/tools/jackson/dataformat/xml Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -228,15 +228,18 @@ protected static XmlMapper.Builder mapperBuilder() {
228228        return  XmlMapper .builder ();
229229    }
230230
231+     protected  static  XmlMapper .Builder  mapperBuilder (boolean  useListWrapping ) {
232+         return  XmlMapper .builder ()
233+                 .defaultUseWrapper (useListWrapping );
234+     }
235+ 
231236    protected  static  XmlMapper .Builder  mapperBuilder (XmlFactory  f ) {
232237        return  XmlMapper .builder (f );
233238    }
234239
235240    protected  XmlMapper  xmlMapper (boolean  useListWrapping )
236241    {
237-         return  XmlMapper .builder ()
238-                 .defaultUseWrapper (useListWrapping )
239-                 .build ();
242+         return  mapperBuilder (useListWrapping ).build ();
240243    }
241244
242245    protected  AnnotationIntrospector  jakartaXMLBindAnnotationIntrospector () {
Original file line number Diff line number Diff line change 66import  org .junit .jupiter .api .Test ;
77
88import  tools .jackson .core .JsonParser ;
9- 
9+ import   tools . jackson . databind . DeserializationFeature ; 
1010import  tools .jackson .dataformat .xml .XmlMapper ;
1111import  tools .jackson .dataformat .xml .XmlTestUtil ;
1212
1515
1616public  class  PartialReadTest  extends  XmlTestUtil 
1717{
18-     private  final  XmlMapper  MAPPER  = xmlMapper (true );
18+     private  final  XmlMapper  MAPPER  = mapperBuilder (true )
19+             .disable (DeserializationFeature .FAIL_ON_TRAILING_TOKENS )
20+             .build ();
1921
2022    @ Test 
2123    public  void  testSimpleRead () throws  Exception 
@@ -28,9 +30,8 @@ public void testSimpleRead() throws Exception
2830        assertEquals (sr .next (), XMLStreamConstants .START_ELEMENT );
2931        assertEquals ("root" , sr .getLocalName ());
3032
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-          */ 
33+         // 30-May-2014, tatu: This is bit tricky... need to ensure that currently 
34+         //    pointed to START_ELEMENT is sort of re-read. 
3435        assertEquals (sr .next (), XMLStreamConstants .START_ELEMENT );
3536        assertEquals ("NameBean" , sr .getLocalName ());
3637
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments