private void compareStrings ( List < String > c1 , List < String > c2 , TreePath loc , String eltname ) throws DeepInequalityException { if ( c1 == null && c2 == null ) { return ; } TreePath recursePath = new TreePath ( loc , eltname ) ; if ( c1 == null || c2 == null || ! c1 . equals ( c2 ) ) { throw new DeepInequalityException ( eltname + " miscompared" , recursePath ) ; } }
I ll treat this as an atomic object type