}
static DeploymentMetadata from(List<PatchDetails> beforeDeployment, List<PatchDetails> afterDeployment) {
ArrayList<PatchDetails> currentDeployment = new ArrayList<PatchDetails>();
PatchDetails firstHistorical =
beforeDeployment.isEmpty() ? null : beforeDeployment.get(0);
for (Iterator<PatchDetails> it = afterDeployment.iterator(); it.hasNext();) {
PatchDetails p = it.next();
if (p.equals(firstHistorical)) {
break;
}
currentDeployment.add(p);
}