if ( releases != null )
{
for ( Object release1 : releases )
{
final Release release = (Release) release1;
final Release componentRelease = getRelease( componentReleases, release.getVersion() );
if ( componentRelease != null )
{
release.addComponent( componentName, componentRelease );
}
mergedReleases.add( release );
}
}
for ( Object componentRelease1 : componentReleases )
{
final Release release = (Release) componentRelease1;
final Release mergedRelease = getRelease( mergedReleases, release.getVersion() );
if ( mergedRelease == null )
{
final Release componentRelease = new Release();
componentRelease.setVersion( release.getVersion() );
componentRelease.setDateRelease( release.getDateRelease() );
componentRelease.addComponent( componentName, release );
mergedReleases.add( componentRelease );
}
}
return mergedReleases;