- Improved code to be more Java 5


git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1628247 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java b/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java
index 600e0df..5cebaf6 100644
--- a/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java
+++ b/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java
@@ -447,6 +447,7 @@
      * @throws MojoFailureException   if an unexpected error occurred while packaging the webapp
      * @throws IOException            if an error occurred while copying the files
      */
+    @SuppressWarnings( "unchecked" )
     public void buildWebapp( MavenProject project, File webappDirectory )
         throws MojoExecutionException, MojoFailureException, IOException
     {
diff --git a/src/test/java/org/apache/maven/plugin/war/WarDependenciesAnalysisTest.java b/src/test/java/org/apache/maven/plugin/war/WarDependenciesAnalysisTest.java
index 0a7ea88..a35acce 100644
--- a/src/test/java/org/apache/maven/plugin/war/WarDependenciesAnalysisTest.java
+++ b/src/test/java/org/apache/maven/plugin/war/WarDependenciesAnalysisTest.java
@@ -132,7 +132,7 @@
             mojo.setWebXml( new File( xmlSource, "web.xml" ) );
             mojo.execute();
 
-            final List assertedFiles = new ArrayList();
+            final List<File> assertedFiles = new ArrayList<File>();
             assertedFiles.addAll( assertDefaultContent( webAppDirectory ) );
             assertedFiles.addAll( assertWebXml( webAppDirectory ) );
             assertedFiles.addAll( assertCustomContent( webAppDirectory, firstCustomContent, "library not found" ) );
@@ -146,7 +146,7 @@
 
             mojo.execute();
 
-            final List assertedFiles2 = new ArrayList();
+            final List<File> assertedFiles2 = new ArrayList<File>();
             assertedFiles2.addAll( assertDefaultContent( webAppDirectory ) );
             assertedFiles2.addAll( assertWebXml( webAppDirectory ) );
             if ( secondCustomContent != null )
diff --git a/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoTest.java b/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoTest.java
index 099a079..6e962d5 100644
--- a/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoTest.java
+++ b/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoTest.java
@@ -290,7 +290,7 @@
 
         // configure mojo
         project.addArtifact( warArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "workDirectory", workDirectory );
         mojo.execute();
 
diff --git a/src/test/java/org/apache/maven/plugin/war/stub/MavenProjectArtifactsStub.java b/src/test/java/org/apache/maven/plugin/war/stub/MavenProjectArtifactsStub.java
index 1b2dacf..5dbed85 100644
--- a/src/test/java/org/apache/maven/plugin/war/stub/MavenProjectArtifactsStub.java
+++ b/src/test/java/org/apache/maven/plugin/war/stub/MavenProjectArtifactsStub.java
@@ -72,9 +72,9 @@
 
     }
 
-    public List getRuntimeClasspathElements()
+    public List<String> getRuntimeClasspathElements()
     {
-        List artifacts = new ArrayList();
+        List<String> artifacts = new ArrayList<String>();
 
         artifacts.add(
             "src/test/resources/unit/manifest/manifest-with-classpath/sample-artifacts/maven-artifact1-1.0-SNAPSHOT.jar" );
diff --git a/src/test/java/org/apache/maven/plugin/war/stub/ModelStub.java b/src/test/java/org/apache/maven/plugin/war/stub/ModelStub.java
index e7c0726..19e92cf 100644
--- a/src/test/java/org/apache/maven/plugin/war/stub/ModelStub.java
+++ b/src/test/java/org/apache/maven/plugin/war/stub/ModelStub.java
@@ -33,6 +33,11 @@
 public class ModelStub
     extends Model
 {
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 7802402157311376304L;
+
     public ModelStub()
     {