fixed errors reported by Checkstyle

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@813622 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Herve Boutemy 2009-09-10 22:25:56 +00:00
parent af5b761568
commit a1803e5a48
2 changed files with 81 additions and 102 deletions

View File

@ -159,7 +159,8 @@ public class ModelMerger
Parent tgt = target.getParent();
if ( tgt == null )
{
target.setParent( tgt = new Parent() );
tgt = new Parent();
target.setParent( tgt );
}
mergeParent( tgt, src, sourceDominant, context );
}
@ -273,7 +274,8 @@ public class ModelMerger
Organization tgt = target.getOrganization();
if ( tgt == null )
{
target.setOrganization( tgt = new Organization() );
tgt = new Organization();
target.setOrganization( tgt );
}
mergeOrganization( tgt, src, sourceDominant, context );
}
@ -287,16 +289,14 @@ public class ModelMerger
List<License> tgt = target.getLicenses();
Map<Object, License> merged = new LinkedHashMap<Object, License>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<License> it = tgt.iterator(); it.hasNext(); )
for ( License element : tgt )
{
License element = it.next();
Object key = getLicenseKey( element );
merged.put( key, element );
}
for ( Iterator<License> it = src.iterator(); it.hasNext(); )
for ( License element : src )
{
License element = it.next();
Object key = getLicenseKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -317,16 +317,14 @@ public class ModelMerger
List<MailingList> tgt = target.getMailingLists();
Map<Object, MailingList> merged = new LinkedHashMap<Object, MailingList>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<MailingList> it = tgt.iterator(); it.hasNext(); )
for ( MailingList element : tgt )
{
MailingList element = it.next();
Object key = getMailingListKey( element );
merged.put( key, element );
}
for ( Iterator<MailingList> it = src.iterator(); it.hasNext(); )
for ( MailingList element : src )
{
MailingList element = it.next();
Object key = getMailingListKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -347,16 +345,14 @@ public class ModelMerger
List<Developer> tgt = target.getDevelopers();
Map<Object, Developer> merged = new LinkedHashMap<Object, Developer>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<Developer> it = tgt.iterator(); it.hasNext(); )
for ( Developer element : tgt )
{
Developer element = it.next();
Object key = getDeveloperKey( element );
merged.put( key, element );
}
for ( Iterator<Developer> it = src.iterator(); it.hasNext(); )
for ( Developer element : src )
{
Developer element = it.next();
Object key = getDeveloperKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -377,16 +373,14 @@ public class ModelMerger
List<Contributor> tgt = target.getContributors();
Map<Object, Contributor> merged = new LinkedHashMap<Object, Contributor>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<Contributor> it = tgt.iterator(); it.hasNext(); )
for ( Contributor element : tgt )
{
Contributor element = it.next();
Object key = getContributorKey( element );
merged.put( key, element );
}
for ( Iterator<Contributor> it = src.iterator(); it.hasNext(); )
for ( Contributor element : src )
{
Contributor element = it.next();
Object key = getContributorKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -407,7 +401,8 @@ public class ModelMerger
IssueManagement tgt = target.getIssueManagement();
if ( tgt == null )
{
target.setIssueManagement( tgt = new IssueManagement() );
tgt = new IssueManagement();
target.setIssueManagement( tgt );
}
mergeIssueManagement( tgt, src, sourceDominant, context );
}
@ -421,7 +416,8 @@ public class ModelMerger
Scm tgt = target.getScm();
if ( tgt == null )
{
target.setScm( tgt = new Scm() );
tgt = new Scm();
target.setScm( tgt );
}
mergeScm( tgt, src, sourceDominant, context );
}
@ -436,7 +432,8 @@ public class ModelMerger
CiManagement tgt = target.getCiManagement();
if ( tgt == null )
{
target.setCiManagement( tgt = new CiManagement() );
tgt = new CiManagement();
target.setCiManagement( tgt );
}
mergeCiManagement( tgt, src, sourceDominant, context );
}
@ -451,7 +448,8 @@ public class ModelMerger
Prerequisites tgt = target.getPrerequisites();
if ( tgt == null )
{
target.setPrerequisites( tgt = new Prerequisites() );
tgt = new Prerequisites();
target.setPrerequisites( tgt );
}
mergePrerequisites( tgt, src, sourceDominant, context );
}
@ -465,7 +463,8 @@ public class ModelMerger
Build tgt = target.getBuild();
if ( tgt == null )
{
target.setBuild( tgt = new Build() );
tgt = new Build();
target.setBuild( tgt );
}
mergeBuild( tgt, src, sourceDominant, context );
}
@ -479,16 +478,14 @@ public class ModelMerger
List<Profile> tgt = target.getProfiles();
Map<Object, Profile> merged = new LinkedHashMap<Object, Profile>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<Profile> it = tgt.iterator(); it.hasNext(); )
for ( Profile element : tgt )
{
Profile element = it.next();
Object key = getProfileKey( element );
merged.put( key, element );
}
for ( Iterator<Profile> it = src.iterator(); it.hasNext(); )
for ( Profile element : src )
{
Profile element = it.next();
Object key = getProfileKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -536,16 +533,14 @@ public class ModelMerger
List<Dependency> tgt = target.getDependencies();
Map<Object, Dependency> merged = new LinkedHashMap<Object, Dependency>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<Dependency> it = tgt.iterator(); it.hasNext(); )
for ( Dependency element : tgt )
{
Dependency element = it.next();
Object key = getDependencyKey( element );
merged.put( key, element );
}
for ( Iterator<Dependency> it = src.iterator(); it.hasNext(); )
for ( Dependency element : src )
{
Dependency element = it.next();
Object key = getDependencyKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -566,16 +561,14 @@ public class ModelMerger
List<Repository> tgt = target.getRepositories();
Map<Object, Repository> merged = new LinkedHashMap<Object, Repository>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<Repository> it = tgt.iterator(); it.hasNext(); )
for ( Repository element : tgt )
{
Repository element = it.next();
Object key = getRepositoryKey( element );
merged.put( key, element );
}
for ( Iterator<Repository> it = src.iterator(); it.hasNext(); )
for ( Repository element : src )
{
Repository element = it.next();
Object key = getRepositoryKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -596,16 +589,14 @@ public class ModelMerger
List<Repository> tgt = target.getPluginRepositories();
Map<Object, Repository> merged = new LinkedHashMap<Object, Repository>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<Repository> it = tgt.iterator(); it.hasNext(); )
for ( Repository element : tgt )
{
Repository element = it.next();
Object key = getRepositoryKey( element );
merged.put( key, element );
}
for ( Iterator<Repository> it = src.iterator(); it.hasNext(); )
for ( Repository element : src )
{
Repository element = it.next();
Object key = getRepositoryKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -626,7 +617,8 @@ public class ModelMerger
DistributionManagement tgt = target.getDistributionManagement();
if ( tgt == null )
{
target.setDistributionManagement( tgt = new DistributionManagement() );
tgt = new DistributionManagement();
target.setDistributionManagement( tgt );
}
mergeDistributionManagement( tgt, src, sourceDominant, context );
}
@ -641,7 +633,8 @@ public class ModelMerger
Reporting tgt = target.getReporting();
if ( tgt == null )
{
target.setReporting( tgt = new Reporting() );
tgt = new Reporting();
target.setReporting( tgt );
}
mergeReporting( tgt, src, sourceDominant, context );
}
@ -656,7 +649,8 @@ public class ModelMerger
DependencyManagement tgt = target.getDependencyManagement();
if ( tgt == null )
{
target.setDependencyManagement( tgt = new DependencyManagement() );
tgt = new DependencyManagement();
target.setDependencyManagement( tgt );
}
mergeDependencyManagement( tgt, src, sourceDominant, context );
}
@ -699,7 +693,8 @@ public class ModelMerger
DeploymentRepository tgt = target.getRepository();
if ( tgt == null )
{
target.setRepository( tgt = new DeploymentRepository() );
tgt = new DeploymentRepository();
target.setRepository( tgt );
}
mergeDeploymentRepository( tgt, src, sourceDominant, context );
}
@ -715,7 +710,8 @@ public class ModelMerger
DeploymentRepository tgt = target.getSnapshotRepository();
if ( tgt == null )
{
target.setSnapshotRepository( tgt = new DeploymentRepository() );
tgt = new DeploymentRepository();
target.setSnapshotRepository( tgt );
}
mergeDeploymentRepository( tgt, src, sourceDominant, context );
}
@ -730,7 +726,8 @@ public class ModelMerger
Site tgt = target.getSite();
if ( tgt == null )
{
target.setSite( tgt = new Site() );
tgt = new Site();
target.setSite( tgt );
}
mergeSite( tgt, src, sourceDominant, context );
}
@ -900,7 +897,8 @@ public class ModelMerger
RepositoryPolicy tgt = target.getReleases();
if ( tgt == null )
{
target.setReleases( tgt = new RepositoryPolicy() );
tgt = new RepositoryPolicy();
target.setReleases( tgt );
}
mergeRepositoryPolicy( tgt, src, sourceDominant, context );
}
@ -915,7 +913,8 @@ public class ModelMerger
RepositoryPolicy tgt = target.getSnapshots();
if ( tgt == null )
{
target.setSnapshots( tgt = new RepositoryPolicy() );
tgt = new RepositoryPolicy();
target.setSnapshots( tgt );
}
mergeRepositoryPolicy( tgt, src, sourceDominant, context );
}
@ -1157,16 +1156,14 @@ public class ModelMerger
Map<Object, Exclusion> merged = new LinkedHashMap<Object, Exclusion>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<Exclusion> it = tgt.iterator(); it.hasNext(); )
for ( Exclusion element : tgt )
{
Exclusion element = it.next();
Object key = getExclusionKey( element );
merged.put( key, element );
}
for ( Iterator<Exclusion> it = src.iterator(); it.hasNext(); )
for ( Exclusion element : src )
{
Exclusion element = it.next();
Object key = getExclusionKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -1255,16 +1252,14 @@ public class ModelMerger
Map<Object, ReportPlugin> merged =
new LinkedHashMap<Object, ReportPlugin>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<ReportPlugin> it = tgt.iterator(); it.hasNext(); )
for ( ReportPlugin element : tgt )
{
ReportPlugin element = it.next();
Object key = getReportPluginKey( element );
merged.put( key, element );
}
for ( Iterator<ReportPlugin> it = src.iterator(); it.hasNext(); )
for ( ReportPlugin element : src )
{
ReportPlugin element = it.next();
Object key = getReportPluginKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -1367,16 +1362,14 @@ public class ModelMerger
List<ReportSet> tgt = target.getReportSets();
Map<Object, ReportSet> merged = new LinkedHashMap<Object, ReportSet>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<ReportSet> it = tgt.iterator(); it.hasNext(); )
for ( ReportSet element : tgt )
{
ReportSet element = it.next();
Object key = getReportSetKey( element );
merged.put( key, element );
}
for ( Iterator<ReportSet> it = src.iterator(); it.hasNext(); )
for ( ReportSet element : src )
{
ReportSet element = it.next();
Object key = getReportSetKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -1403,16 +1396,14 @@ public class ModelMerger
List<Dependency> tgt = target.getDependencies();
Map<Object, Dependency> merged = new LinkedHashMap<Object, Dependency>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<Dependency> it = tgt.iterator(); it.hasNext(); )
for ( Dependency element : tgt )
{
Dependency element = it.next();
Object key = getDependencyKey( element );
merged.put( key, element );
}
for ( Iterator<Dependency> it = src.iterator(); it.hasNext(); )
for ( Dependency element : src )
{
Dependency element = it.next();
Object key = getDependencyKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -1940,16 +1931,14 @@ public class ModelMerger
List<Notifier> tgt = target.getNotifiers();
Map<Object, Notifier> merged = new LinkedHashMap<Object, Notifier>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<Notifier> it = tgt.iterator(); it.hasNext(); )
for ( Notifier element : tgt )
{
Notifier element = it.next();
Object key = getNotifierKey( element );
merged.put( key, element );
}
for ( Iterator<Notifier> it = src.iterator(); it.hasNext(); )
for ( Notifier element : src )
{
Notifier element = it.next();
Object key = getNotifierKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -2155,16 +2144,14 @@ public class ModelMerger
List<Extension> tgt = target.getExtensions();
Map<Object, Extension> merged = new LinkedHashMap<Object, Extension>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<Extension> it = tgt.iterator(); it.hasNext(); )
for ( Extension element : tgt )
{
Extension element = it.next();
Object key = getExtensionKey( element );
merged.put( key, element );
}
for ( Iterator<Extension> it = src.iterator(); it.hasNext(); )
for ( Extension element : src )
{
Extension element = it.next();
Object key = getExtensionKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -2297,16 +2284,14 @@ public class ModelMerger
List<Resource> tgt = target.getResources();
Map<Object, Resource> merged = new LinkedHashMap<Object, Resource>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<Resource> it = tgt.iterator(); it.hasNext(); )
for ( Resource element : tgt )
{
Resource element = it.next();
Object key = getResourceKey( element );
merged.put( key, element );
}
for ( Iterator<Resource> it = src.iterator(); it.hasNext(); )
for ( Resource element : src )
{
Resource element = it.next();
Object key = getResourceKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -2327,16 +2312,14 @@ public class ModelMerger
List<Resource> tgt = target.getTestResources();
Map<Object, Resource> merged = new LinkedHashMap<Object, Resource>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<Resource> it = tgt.iterator(); it.hasNext(); )
for ( Resource element : tgt )
{
Resource element = it.next();
Object key = getResourceKey( element );
merged.put( key, element );
}
for ( Iterator<Resource> it = src.iterator(); it.hasNext(); )
for ( Resource element : src )
{
Resource element = it.next();
Object key = getResourceKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -2364,7 +2347,8 @@ public class ModelMerger
PluginManagement tgt = target.getPluginManagement();
if ( tgt == null )
{
target.setPluginManagement( tgt = new PluginManagement() );
tgt = new PluginManagement();
target.setPluginManagement( tgt );
}
mergePluginManagement( tgt, src, sourceDominant, context );
}
@ -2385,16 +2369,14 @@ public class ModelMerger
List<Plugin> tgt = target.getPlugins();
Map<Object, Plugin> merged = new LinkedHashMap<Object, Plugin>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<Plugin> it = tgt.iterator(); it.hasNext(); )
for ( Plugin element : tgt )
{
Plugin element = it.next();
Object key = getPluginKey( element );
merged.put( key, element );
}
for ( Iterator<Plugin> it = src.iterator(); it.hasNext(); )
for ( Plugin element : src )
{
Plugin element = it.next();
Object key = getPluginKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -2484,16 +2466,14 @@ public class ModelMerger
List<Dependency> tgt = target.getDependencies();
Map<Object, Dependency> merged = new LinkedHashMap<Object, Dependency>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<Dependency> it = tgt.iterator(); it.hasNext(); )
for ( Dependency element : tgt )
{
Dependency element = it.next();
Object key = getDependencyKey( element );
merged.put( key, element );
}
for ( Iterator<Dependency> it = src.iterator(); it.hasNext(); )
for ( Dependency element : src )
{
Dependency element = it.next();
Object key = getDependencyKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
@ -2516,16 +2496,14 @@ public class ModelMerger
Map<Object, PluginExecution> merged =
new LinkedHashMap<Object, PluginExecution>( ( src.size() + tgt.size() ) * 2 );
for ( Iterator<PluginExecution> it = tgt.iterator(); it.hasNext(); )
for ( PluginExecution element : tgt )
{
PluginExecution element = it.next();
Object key = getPluginExecutionKey( element );
merged.put( key, element );
}
for ( Iterator<PluginExecution> it = src.iterator(); it.hasNext(); )
for ( PluginExecution element : src )
{
PluginExecution element = it.next();
Object key = getPluginExecutionKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{

View File

@ -2406,7 +2406,8 @@
*/
public boolean equals( Object obj )
{
if ( obj instanceof RepositoryBase ) {
if ( obj instanceof RepositoryBase )
{
final RepositoryBase other = (RepositoryBase) obj;