Repository: maven Updated Branches: refs/heads/master 40d5087b6 -> 7badeb5b5
http://git-wip-us.apache.org/repos/asf/maven/blob/7badeb5b/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java ---------------------------------------------------------------------- diff --git a/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java b/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java index b671d98..1222287 100644 --- a/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java +++ b/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java @@ -114,7 +114,7 @@ public class ModelMerger return; } - Map<Object, Object> context = new HashMap<Object, Object>(); + Map<Object, Object> context = new HashMap<>(); if ( hints != null ) { context.putAll( hints ); @@ -313,7 +313,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<License> tgt = target.getLicenses(); - Map<Object, License> merged = new LinkedHashMap<Object, License>( ( src.size() + tgt.size() ) * 2 ); + Map<Object, License> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( License element : tgt ) { @@ -330,7 +330,7 @@ public class ModelMerger } } - target.setLicenses( new ArrayList<License>( merged.values() ) ); + target.setLicenses( new ArrayList<>( merged.values() ) ); } } @@ -341,7 +341,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<MailingList> tgt = target.getMailingLists(); - Map<Object, MailingList> merged = new LinkedHashMap<Object, MailingList>( ( src.size() + tgt.size() ) * 2 ); + Map<Object, MailingList> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( MailingList element : tgt ) { @@ -358,7 +358,7 @@ public class ModelMerger } } - target.setMailingLists( new ArrayList<MailingList>( merged.values() ) ); + target.setMailingLists( new ArrayList<>( merged.values() ) ); } } @@ -369,7 +369,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<Developer> tgt = target.getDevelopers(); - Map<Object, Developer> merged = new LinkedHashMap<Object, Developer>( ( src.size() + tgt.size() ) * 2 ); + Map<Object, Developer> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( Developer element : tgt ) { @@ -386,7 +386,7 @@ public class ModelMerger } } - target.setDevelopers( new ArrayList<Developer>( merged.values() ) ); + target.setDevelopers( new ArrayList<>( merged.values() ) ); } } @@ -397,7 +397,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<Contributor> tgt = target.getContributors(); - Map<Object, Contributor> merged = new LinkedHashMap<Object, Contributor>( ( src.size() + tgt.size() ) * 2 ); + Map<Object, Contributor> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( Contributor element : tgt ) { @@ -414,7 +414,7 @@ public class ModelMerger } } - target.setContributors( new ArrayList<Contributor>( merged.values() ) ); + target.setContributors( new ArrayList<>( merged.values() ) ); } } @@ -505,7 +505,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<Profile> tgt = target.getProfiles(); - Map<Object, Profile> merged = new LinkedHashMap<Object, Profile>( ( src.size() + tgt.size() ) * 2 ); + Map<Object, Profile> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( Profile element : tgt ) { @@ -522,7 +522,7 @@ public class ModelMerger } } - target.setProfiles( new ArrayList<Profile>( merged.values() ) ); + target.setProfiles( new ArrayList<>( merged.values() ) ); } } @@ -546,7 +546,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<String> tgt = target.getModules(); - List<String> merged = new ArrayList<String>( tgt.size() + src.size() ); + List<String> merged = new ArrayList<>( tgt.size() + src.size() ); merged.addAll( tgt ); merged.addAll( src ); target.setModules( merged ); @@ -560,7 +560,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<Dependency> tgt = target.getDependencies(); - Map<Object, Dependency> merged = new LinkedHashMap<Object, Dependency>( ( src.size() + tgt.size() ) * 2 ); + Map<Object, Dependency> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( Dependency element : tgt ) { @@ -577,7 +577,7 @@ public class ModelMerger } } - target.setDependencies( new ArrayList<Dependency>( merged.values() ) ); + target.setDependencies( new ArrayList<>( merged.values() ) ); } } @@ -588,7 +588,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<Repository> tgt = target.getRepositories(); - Map<Object, Repository> merged = new LinkedHashMap<Object, Repository>( ( src.size() + tgt.size() ) * 2 ); + Map<Object, Repository> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( Repository element : tgt ) { @@ -605,7 +605,7 @@ public class ModelMerger } } - target.setRepositories( new ArrayList<Repository>( merged.values() ) ); + target.setRepositories( new ArrayList<>( merged.values() ) ); } } @@ -616,7 +616,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<Repository> tgt = target.getPluginRepositories(); - Map<Object, Repository> merged = new LinkedHashMap<Object, Repository>( ( src.size() + tgt.size() ) * 2 ); + Map<Object, Repository> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( Repository element : tgt ) { @@ -633,7 +633,7 @@ public class ModelMerger } } - target.setPluginRepositories( new ArrayList<Repository>( merged.values() ) ); + target.setPluginRepositories( new ArrayList<>( merged.values() ) ); } } @@ -1211,7 +1211,7 @@ public class ModelMerger { List<Exclusion> tgt = target.getExclusions(); - Map<Object, Exclusion> merged = new LinkedHashMap<Object, Exclusion>( ( src.size() + tgt.size() ) * 2 ); + Map<Object, Exclusion> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( Exclusion element : tgt ) { @@ -1228,7 +1228,7 @@ public class ModelMerger } } - target.setExclusions( new ArrayList<Exclusion>( merged.values() ) ); + target.setExclusions( new ArrayList<>( merged.values() ) ); } } @@ -1311,7 +1311,7 @@ public class ModelMerger { List<ReportPlugin> tgt = target.getPlugins(); Map<Object, ReportPlugin> merged = - new LinkedHashMap<Object, ReportPlugin>( ( src.size() + tgt.size() ) * 2 ); + new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( ReportPlugin element : tgt ) { @@ -1328,7 +1328,7 @@ public class ModelMerger } } - target.setPlugins( new ArrayList<ReportPlugin>( merged.values() ) ); + target.setPlugins( new ArrayList<>( merged.values() ) ); } } @@ -1391,7 +1391,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<ReportSet> tgt = target.getReportSets(); - Map<Object, ReportSet> merged = new LinkedHashMap<Object, ReportSet>( ( src.size() + tgt.size() ) * 2 ); + Map<Object, ReportSet> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( ReportSet element : tgt ) { @@ -1408,7 +1408,7 @@ public class ModelMerger } } - target.setReportSets( new ArrayList<ReportSet>( merged.values() ) ); + target.setReportSets( new ArrayList<>( merged.values() ) ); } } @@ -1441,7 +1441,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<String> tgt = target.getReports(); - List<String> merged = new ArrayList<String>( tgt.size() + src.size() ); + List<String> merged = new ArrayList<>( tgt.size() + src.size() ); merged.addAll( tgt ); merged.addAll( src ); target.setReports( merged ); @@ -1461,7 +1461,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<Dependency> tgt = target.getDependencies(); - Map<Object, Dependency> merged = new LinkedHashMap<Object, Dependency>( ( src.size() + tgt.size() ) * 2 ); + Map<Object, Dependency> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( Dependency element : tgt ) { @@ -1478,7 +1478,7 @@ public class ModelMerger } } - target.setDependencies( new ArrayList<Dependency>( merged.values() ) ); + target.setDependencies( new ArrayList<>( merged.values() ) ); } } @@ -1732,7 +1732,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<String> tgt = target.getOtherArchives(); - List<String> merged = new ArrayList<String>( tgt.size() + src.size() ); + List<String> merged = new ArrayList<>( tgt.size() + src.size() ); merged.addAll( tgt ); merged.addAll( src ); target.setOtherArchives( merged ); @@ -1864,7 +1864,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<String> tgt = target.getRoles(); - List<String> merged = new ArrayList<String>( tgt.size() + src.size() ); + List<String> merged = new ArrayList<>( tgt.size() + src.size() ); merged.addAll( tgt ); merged.addAll( src ); target.setRoles( merged ); @@ -2029,7 +2029,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<Notifier> tgt = target.getNotifiers(); - Map<Object, Notifier> merged = new LinkedHashMap<Object, Notifier>( ( src.size() + tgt.size() ) * 2 ); + Map<Object, Notifier> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( Notifier element : tgt ) { @@ -2046,7 +2046,7 @@ public class ModelMerger } } - target.setNotifiers( new ArrayList<Notifier>( merged.values() ) ); + target.setNotifiers( new ArrayList<>( merged.values() ) ); } } @@ -2249,7 +2249,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<Extension> tgt = target.getExtensions(); - Map<Object, Extension> merged = new LinkedHashMap<Object, Extension>( ( src.size() + tgt.size() ) * 2 ); + Map<Object, Extension> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( Extension element : tgt ) { @@ -2266,7 +2266,7 @@ public class ModelMerger } } - target.setExtensions( new ArrayList<Extension>( merged.values() ) ); + target.setExtensions( new ArrayList<>( merged.values() ) ); } } @@ -2381,7 +2381,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<String> tgt = target.getFilters(); - List<String> merged = new ArrayList<String>( tgt.size() + src.size() ); + List<String> merged = new ArrayList<>( tgt.size() + src.size() ); merged.addAll( tgt ); merged.addAll( src ); target.setFilters( merged ); @@ -2395,7 +2395,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<Resource> tgt = target.getResources(); - Map<Object, Resource> merged = new LinkedHashMap<Object, Resource>( ( src.size() + tgt.size() ) * 2 ); + Map<Object, Resource> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( Resource element : tgt ) { @@ -2412,7 +2412,7 @@ public class ModelMerger } } - target.setResources( new ArrayList<Resource>( merged.values() ) ); + target.setResources( new ArrayList<>( merged.values() ) ); } } @@ -2423,7 +2423,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<Resource> tgt = target.getTestResources(); - Map<Object, Resource> merged = new LinkedHashMap<Object, Resource>( ( src.size() + tgt.size() ) * 2 ); + Map<Object, Resource> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( Resource element : tgt ) { @@ -2440,7 +2440,7 @@ public class ModelMerger } } - target.setTestResources( new ArrayList<Resource>( merged.values() ) ); + target.setTestResources( new ArrayList<>( merged.values() ) ); } } @@ -2480,7 +2480,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<Plugin> tgt = target.getPlugins(); - Map<Object, Plugin> merged = new LinkedHashMap<Object, Plugin>( ( src.size() + tgt.size() ) * 2 ); + Map<Object, Plugin> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( Plugin element : tgt ) { @@ -2497,7 +2497,7 @@ public class ModelMerger } } - target.setPlugins( new ArrayList<Plugin>( merged.values() ) ); + target.setPlugins( new ArrayList<>( merged.values() ) ); } } @@ -2581,7 +2581,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<Dependency> tgt = target.getDependencies(); - Map<Object, Dependency> merged = new LinkedHashMap<Object, Dependency>( ( src.size() + tgt.size() ) * 2 ); + Map<Object, Dependency> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( Dependency element : tgt ) { @@ -2598,7 +2598,7 @@ public class ModelMerger } } - target.setDependencies( new ArrayList<Dependency>( merged.values() ) ); + target.setDependencies( new ArrayList<>( merged.values() ) ); } } @@ -2611,7 +2611,7 @@ public class ModelMerger List<PluginExecution> tgt = target.getExecutions(); Map<Object, PluginExecution> merged = - new LinkedHashMap<Object, PluginExecution>( ( src.size() + tgt.size() ) * 2 ); + new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 ); for ( PluginExecution element : tgt ) { @@ -2628,7 +2628,7 @@ public class ModelMerger } } - target.setExecutions( new ArrayList<PluginExecution>( merged.values() ) ); + target.setExecutions( new ArrayList<>( merged.values() ) ); } } @@ -2717,7 +2717,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<String> tgt = target.getGoals(); - List<String> merged = new ArrayList<String>( tgt.size() + src.size() ); + List<String> merged = new ArrayList<>( tgt.size() + src.size() ); merged.addAll( tgt ); merged.addAll( src ); target.setGoals( merged ); @@ -2808,7 +2808,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<String> tgt = target.getIncludes(); - List<String> merged = new ArrayList<String>( tgt.size() + src.size() ); + List<String> merged = new ArrayList<>( tgt.size() + src.size() ); merged.addAll( tgt ); merged.addAll( src ); target.setIncludes( merged ); @@ -2822,7 +2822,7 @@ public class ModelMerger if ( !src.isEmpty() ) { List<String> tgt = target.getExcludes(); - List<String> merged = new ArrayList<String>( tgt.size() + src.size() ); + List<String> merged = new ArrayList<>( tgt.size() + src.size() ); merged.addAll( tgt ); merged.addAll( src ); target.setExcludes( merged ); http://git-wip-us.apache.org/repos/asf/maven/blob/7badeb5b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java ---------------------------------------------------------------------- diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java index bc2d555..697d95a 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java @@ -223,7 +223,7 @@ public class MojoDescriptor if ( parameters == null ) { - parameters = new LinkedList<Parameter>(); + parameters = new LinkedList<>(); } parameters.add( parameter ); @@ -236,7 +236,7 @@ public class MojoDescriptor { if ( parameterMap == null ) { - parameterMap = new HashMap<String, Parameter>(); + parameterMap = new HashMap<>(); if ( parameters != null ) { http://git-wip-us.apache.org/repos/asf/maven/blob/7badeb5b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java ---------------------------------------------------------------------- diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java index 1d6f1be..b70d291 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java @@ -389,7 +389,7 @@ public class PluginDescriptor IOUtil.close( reader ); } - lifecycleMappings = new HashMap<String, Lifecycle>(); + lifecycleMappings = new HashMap<>(); for ( Lifecycle lifecycle : lifecycleConfiguration.getLifecycles() ) { http://git-wip-us.apache.org/repos/asf/maven/blob/7badeb5b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java ---------------------------------------------------------------------- diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java index 66b1691..7224554 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java @@ -92,7 +92,7 @@ public class PluginDescriptorBuilder PlexusConfiguration[] dependencyConfigurations = c.getChild( "dependencies" ).getChildren( "dependency" ); - List<ComponentDependency> dependencies = new ArrayList<ComponentDependency>(); + List<ComponentDependency> dependencies = new ArrayList<>(); for ( PlexusConfiguration d : dependencyConfigurations ) { @@ -267,7 +267,7 @@ public class PluginDescriptorBuilder PlexusConfiguration[] parameterConfigurations = c.getChild( "parameters" ).getChildren( "parameter" ); - List<Parameter> parameters = new ArrayList<Parameter>(); + List<Parameter> parameters = new ArrayList<>(); for ( PlexusConfiguration d : parameterConfigurations ) { @@ -346,11 +346,7 @@ public class PluginDescriptorBuilder { return new XmlPlexusConfiguration( Xpp3DomBuilder.build( configuration ) ); } - catch ( IOException e ) - { - throw new PlexusConfigurationException( e.getMessage(), e ); - } - catch ( XmlPullParserException e ) + catch ( IOException | XmlPullParserException e ) { throw new PlexusConfigurationException( e.getMessage(), e ); } http://git-wip-us.apache.org/repos/asf/maven/blob/7badeb5b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsBuildingException.java ---------------------------------------------------------------------- diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsBuildingException.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsBuildingException.java index f7d48e4..0f2ade2 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsBuildingException.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsBuildingException.java @@ -46,7 +46,7 @@ public class SettingsBuildingException { super( toMessage( problems ) ); - this.problems = new ArrayList<SettingsProblem>(); + this.problems = new ArrayList<>(); if ( problems != null ) { this.problems.addAll( problems ); http://git-wip-us.apache.org/repos/asf/maven/blob/7badeb5b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecrypter.java ---------------------------------------------------------------------- diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecrypter.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecrypter.java index acdb4b2..671a20d 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecrypter.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecrypter.java @@ -48,9 +48,9 @@ public class DefaultSettingsDecrypter @Override public SettingsDecryptionResult decrypt( SettingsDecryptionRequest request ) { - List<SettingsProblem> problems = new ArrayList<SettingsProblem>(); + List<SettingsProblem> problems = new ArrayList<>(); - List<Server> servers = new ArrayList<Server>(); + List<Server> servers = new ArrayList<>(); for ( Server server : request.getServers() ) { @@ -79,7 +79,7 @@ public class DefaultSettingsDecrypter } } - List<Proxy> proxies = new ArrayList<Proxy>(); + List<Proxy> proxies = new ArrayList<>(); for ( Proxy proxy : request.getProxies() ) { http://git-wip-us.apache.org/repos/asf/maven/blob/7badeb5b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionRequest.java ---------------------------------------------------------------------- diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionRequest.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionRequest.java index 31185f1..9cb49ac 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionRequest.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionRequest.java @@ -66,7 +66,7 @@ public class DefaultSettingsDecryptionRequest */ public DefaultSettingsDecryptionRequest( Server server ) { - this.servers = new ArrayList<Server>( Arrays.asList( server ) ); + this.servers = new ArrayList<>( Arrays.asList( server ) ); } /** @@ -76,7 +76,7 @@ public class DefaultSettingsDecryptionRequest */ public DefaultSettingsDecryptionRequest( Proxy proxy ) { - this.proxies = new ArrayList<Proxy>( Arrays.asList( proxy ) ); + this.proxies = new ArrayList<>( Arrays.asList( proxy ) ); } @Override @@ -84,7 +84,7 @@ public class DefaultSettingsDecryptionRequest { if ( servers == null ) { - servers = new ArrayList<Server>(); + servers = new ArrayList<>(); } return servers; @@ -103,7 +103,7 @@ public class DefaultSettingsDecryptionRequest { if ( proxies == null ) { - proxies = new ArrayList<Proxy>(); + proxies = new ArrayList<>(); } return proxies; http://git-wip-us.apache.org/repos/asf/maven/blob/7badeb5b/maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java ---------------------------------------------------------------------- diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java index fd419fb..8d9f67b 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java @@ -56,7 +56,7 @@ public class MavenSettingsMerger { if ( dominantActiveProfiles == null ) { - dominantActiveProfiles = new ArrayList<String>(); + dominantActiveProfiles = new ArrayList<>(); dominant.setActiveProfiles( dominantActiveProfiles ); } @@ -77,7 +77,7 @@ public class MavenSettingsMerger { if ( dominantPluginGroupIds == null ) { - dominantPluginGroupIds = new ArrayList<String>(); + dominantPluginGroupIds = new ArrayList<>(); dominant.setPluginGroups( dominantPluginGroupIds ); } @@ -129,7 +129,7 @@ public class MavenSettingsMerger */ private static <T extends IdentifiableBase> Map<String, T> mapById( List<T> identifiables ) { - Map<String, T> byId = new HashMap<String, T>(); + Map<String, T> byId = new HashMap<>(); for ( T identifiable : identifiables ) { http://git-wip-us.apache.org/repos/asf/maven/blob/7badeb5b/maven-settings-builder/src/main/java/org/apache/maven/settings/validation/DefaultSettingsValidator.java ---------------------------------------------------------------------- diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/validation/DefaultSettingsValidator.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/validation/DefaultSettingsValidator.java index 5d17456..5c4f10f 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/validation/DefaultSettingsValidator.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/validation/DefaultSettingsValidator.java @@ -81,7 +81,7 @@ public class DefaultSettingsValidator if ( servers != null ) { - Set<String> serverIds = new HashSet<String>(); + Set<String> serverIds = new HashSet<>(); for ( int i = 0; i < servers.size(); i++ ) { @@ -125,7 +125,7 @@ public class DefaultSettingsValidator if ( profiles != null ) { - Set<String> profileIds = new HashSet<String>(); + Set<String> profileIds = new HashSet<>(); for ( Profile profile : profiles ) { @@ -163,7 +163,7 @@ public class DefaultSettingsValidator private void validateRepositories( SettingsProblemCollector problems, List<Repository> repositories, String prefix ) { - Set<String> repoIds = new HashSet<String>(); + Set<String> repoIds = new HashSet<>(); for ( Repository repository : repositories ) { http://git-wip-us.apache.org/repos/asf/maven/blob/7badeb5b/maven-settings-builder/src/test/java/org/apache/maven/settings/validation/DefaultSettingsValidatorTest.java ---------------------------------------------------------------------- diff --git a/maven-settings-builder/src/test/java/org/apache/maven/settings/validation/DefaultSettingsValidatorTest.java b/maven-settings-builder/src/test/java/org/apache/maven/settings/validation/DefaultSettingsValidatorTest.java index 8c7f21d..b9f4873 100644 --- a/maven-settings-builder/src/test/java/org/apache/maven/settings/validation/DefaultSettingsValidatorTest.java +++ b/maven-settings-builder/src/test/java/org/apache/maven/settings/validation/DefaultSettingsValidatorTest.java @@ -232,7 +232,7 @@ public class DefaultSettingsValidatorTest implements SettingsProblemCollector { - public List<String> messages = new ArrayList<String>(); + public List<String> messages = new ArrayList<>(); public void add( Severity severity, String message, int line, int column, Exception cause ) { http://git-wip-us.apache.org/repos/asf/maven/blob/7badeb5b/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index dce0b53..5286e1b 100644 --- a/pom.xml +++ b/pom.xml @@ -509,8 +509,8 @@ <configuration> <signature> <groupId>org.codehaus.mojo.signature</groupId> - <artifactId>java16</artifactId> - <version>1.1</version> + <artifactId>java17</artifactId> + <version>1.0</version> </signature> </configuration> <executions>