private Difference createNullObject()
    {
        Difference difference = new Difference();
        difference.setClassName("");
        difference.setMethod("");
        difference.setField("");
        difference.setFrom("");
        difference.setTo("");
        difference.setJustification( bundle.getString( "report.clirr.api.changes.unjustified" ) );
        return difference;
    }
private Difference createNullObject ( ) { Difference difference = new Difference ( ) ; difference . setClassName ( "" ) ; difference . setMethod ( "" ) ; difference . setField ( "" ) ; difference . setFrom ( "" ) ; difference . setTo ( "" ) ; difference . setJustification ( bundle . getString ( "report.clirr.api.changes.unjustified" ) ) ; return difference ; }
Use a null object to avoid doing null checks everywhere.