container/src/main/java/com/streamsets/datacollector/configupgrade/PipelineConfigurationUpgrader.java
public StageConfiguration upgradeIfNecessary(StageLibraryTask libraryTask, StageConfiguration stageConf, List<Issue> issues) {
    Preconditions.checkArgument(issues.isEmpty(), "Given list of issues must be empty.");
    boolean upgrade = needsUpgrade(libraryTask, stageConf, issues);

    if(upgrade) {
      stageConf = upgradeIfNeeded(libraryTask, stageConf, issues);
    }

    return issues.isEmpty() ? stageConf : null;
  }
public StageConfiguration upgradeIfNecessary(StageLibraryTask libraryTask, StageConfiguration stageConf, List<Issue> issues) {
    Preconditions.checkArgument(issues.isEmpty(), "Given list of issues must be empty.");
    boolean upgrade = needsUpgrade(libraryTask, stageConf, issues);

    if(upgrade) {
      stageConf = upgradeIfNeeded(libraryTask, stageConf, issues);
    }

    return issues.isEmpty() ? stageConf : null;
  }
Upgrade detached stage (stage not associated directly with the pipeline).

@param libraryTask Stage Library
@param stageConf Existing stage configuration
@param issues Issues
@return Upgraded stage configuration or null on any error