public static List cloneExclusions( List exclusions ) { if ( exclusions == null ) { return null; } List ret = new ArrayList(); Iterator it = exclusions.iterator(); while ( it.hasNext() ) { Exclusion exclusion = (Exclusion) it.next(); Exclusion cloned = new Exclusion(); cloned.setGroupId( exclusion.getGroupId() ); cloned.setArtifactId( exclusion.getArtifactId() ); ret.add( cloned ); } return ret; }