@ SuppressWarnings ( { "unchecked" , "unused" } ) private static void rewriteMergeList ( String key , String subKey , NamedList < Object > snl , NamedList < Object > tnl ) { for ( int i = 0 ; i < tnl . size ( ) ; i ++ ) { Object item = snl . get ( tnl . getName ( i ) ) ; if ( item != null && tnl . getVal ( i ) instanceof NamedList ) { NamedList < Object > tnnl = ( NamedList < Object > ) tnl . getVal ( i ) ; Object o = tnnl . get ( key ) ; NamedList < Object > tnnnl ; if ( o != null && o instanceof NamedList ) { tnnnl = ( NamedList < Object > ) o ; } else { tnnnl = new SimpleOrderedMap <> ( ) ; tnnl . add ( key , tnnnl ) ; } tnnnl . add ( subKey , item ) ; } } }
Rewrite merge list .