void addChangesRecursively(Server server,List<MaterialRevision> outChanges) throws MalformedURLException, IOException {
  if (!changed) {
    return;
  }
  if (!isPipeline()) {
    if (!outChanges.contains(this))     outChanges.add(this);
  }
 else {
    for (    Modification m : modifications) {
      Matcher matcher=PIPELINE_REVISION_PATTERN.matcher(m.revision);
      if (matcher.matches()) {
        String pipelineName=matcher.group(1);
        int pipelineCounter=Integer.parseInt(matcher.group(2));
        Pipeline pipeline=server.getPipelineInstance(pipelineName,pipelineCounter);
        pipeline.addChangesRecursively(server,outChanges);
      }
 else {
        LOG.error("Error matching pipeline revision: " + m.revision);
      }
    }
  }
}

void addChangesRecursively ( Server server , List < MaterialRevision > outChanges ) throws MalformedURLException , IOException { if ( ! changed ) { return ; } if ( ! isPipeline ( ) ) { if ( ! outChanges . contains ( this ) ) outChanges . add ( this ) ; } else { for ( Modification m : modifications ) { Matcher matcher = PIPELINE_REVISION_PATTERN . matcher ( m . revision ) ; if ( matcher . matches ( ) ) { String pipelineName = matcher . group ( 1 ) ; int pipelineCounter = Integer . parseInt ( matcher . group ( 2 ) ) ; Pipeline pipeline = server . getPipelineInstance ( pipelineName , pipelineCounter ) ; pipeline . addChangesRecursively ( server , outChanges ) ; } else { LOG . error ( "Error matching pipeline revision: " + m . revision ) ; } } } }
collect all changed materialrevision objects , walking changed " pipeline " objects recursively instead of including them directly .
