Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public void execute()
outputFileNameMapping, typeMappingService );

getLog().debug( "Resolving ear modules ..." );
List<EarModule> allModules = new ArrayList<EarModule>();
List<EarModule> allModules = new ArrayList<>();
try
{
if ( modules != null && modules.length > 0 )
Expand Down Expand Up @@ -394,7 +394,7 @@ private void initializeJbossConfiguration()
final String jmxName = jboss.getChild( JbossConfiguration.JMX_NAME ).getValue();
final String moduleOrder = jboss.getChild( JbossConfiguration.MODULE_ORDER ).getValue();

final List<String> dataSources = new ArrayList<String>();
final List<String> dataSources = new ArrayList<>();
final PlexusConfiguration dataSourcesEl = jboss.getChild( JbossConfiguration.DATASOURCES );
if ( dataSourcesEl != null )
{
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/apache/maven/plugins/ear/EarMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ private void copyModules( final JavaEEVersion javaEEVersion,
private List<String> createUnpackList()
throws MojoExecutionException
{
List<String> unpackTypesList = new ArrayList<String>();
List<String> unpackTypesList = new ArrayList<>();
if ( unpackTypes != null )
{
unpackTypesList = Arrays.asList( unpackTypes.split( "," ) );
Expand Down Expand Up @@ -532,7 +532,7 @@ public void setApplicationXml( File applicationXml )
*/
protected String[] getExcludes()
{
List<String> excludeList = new ArrayList<String>( FileUtils.getDefaultExcludesAsList() );
List<String> excludeList = new ArrayList<>( FileUtils.getDefaultExcludesAsList() );
if ( earSourceExcludes != null && !"".equals( earSourceExcludes ) )
{
excludeList.addAll( Arrays.asList( StringUtils.split( earSourceExcludes, "," ) ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ protected void generateJbossDeploymentDescriptor()
private List<SecurityRole> buildSecurityRoles()
throws EarPluginException
{
final List<SecurityRole> result = new ArrayList<SecurityRole>();
final List<SecurityRole> result = new ArrayList<>();
if ( security == null )
{
return result;
Expand Down Expand Up @@ -349,7 +349,7 @@ private String interpolate( Interpolator interpolator, String element )
private List<EnvEntry> buildEnvEntries()
throws EarPluginException
{
final List<EnvEntry> result = new ArrayList<EnvEntry>();
final List<EnvEntry> result = new ArrayList<>();
if ( envEntries == null )
{
return result;
Expand Down Expand Up @@ -404,7 +404,7 @@ private List<EnvEntry> buildEnvEntries()
private List<EjbRef> buildEjbEntries()
throws EarPluginException
{
final List<EjbRef> result = new ArrayList<EjbRef>();
final List<EjbRef> result = new ArrayList<>();
if ( ejbRefs == null )
{
return result;
Expand Down Expand Up @@ -454,7 +454,7 @@ private List<EjbRef> buildEjbEntries()
private List<ResourceRef> buildResourceRefs()
throws EarPluginException
{
final List<ResourceRef> result = new ArrayList<ResourceRef>();
final List<ResourceRef> result = new ArrayList<>();
if ( resourceRefs == null )
{
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public Artifact getUniqueArtifact( String groupId, String artifactId, String typ
*/
public Set<Artifact> getArtifacts( String groupId, String artifactId, String type )
{
final Set<Artifact> result = new TreeSet<Artifact>();
final Set<Artifact> result = new TreeSet<>();
for ( Artifact a : artifacts )
{
// If the groupId, the artifactId and if the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ public class ArtifactTypeMappingService
*/
public ArtifactTypeMappingService()
{
this.typeMappings = new HashMap<String, List<String>>();
this.customMappings = new HashMap<String, String>();
this.typeMappings = new HashMap<>();
this.customMappings = new HashMap<>();
init();
}

Expand Down Expand Up @@ -170,7 +170,7 @@ private void init()
// Initialize the mapping with the standard artifact types
for ( String type : EarModuleFactory.getStandardArtifactTypes() )
{
List<String> typeMapping = new ArrayList<String>();
List<String> typeMapping = new ArrayList<>();
typeMapping.add( type );
this.typeMappings.put( type, typeMapping );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class JavaEEVersion

private static final String VERSION_10 = "10";

private static final Map<String, JavaEEVersion> VERSION_MAP = new HashMap<String, JavaEEVersion>();
private static final Map<String, JavaEEVersion> VERSION_MAP = new HashMap<>();

/**
* Represents the J2EE 1.3 version.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected Set<Artifact> createArtifacts( String[] artifactIds )

protected Set<Artifact> createArtifacts( String[] artifactIds, String[] classifiers )
{
Set<Artifact> result = new TreeSet<Artifact>();
Set<Artifact> result = new TreeSet<>();
ArtifactHandlerTestStub artifactHandler = new ArtifactHandlerTestStub( "jar" );
for ( int i = 0; i < artifactIds.length; i++ )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ private void assertArchiveContent( final File baseDir, final String projectName,
File dir = getEarDirectory( baseDir, projectName );

// Let's build the expected directories sort list
final List<File> expectedDirectories = new ArrayList<File>();
final List<File> expectedDirectories = new ArrayList<>();
for ( int i = 0; i < artifactsDirectory.length; i++ )
{
if ( artifactsDirectory[i] )
Expand Down Expand Up @@ -407,7 +407,7 @@ protected void assertEarModulesContent( final File baseDir, final String project

private static List<File> buildArchiveContentFiles( final File baseDir, final List<File> expectedDirectories )
{
final List<File> result = new ArrayList<File>();
final List<File> result = new ArrayList<>();
addFiles( baseDir, result, expectedDirectories );

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class EarMavenArchiverTest
extends AbstractEarTestBase
{

private List<EarModule> modules = new ArrayList<EarModule>();
private List<EarModule> modules = new ArrayList<>();

@Test
public void testSimpleEjbModule()
Expand Down