upgraded parent pom
authorHerve Boutemy <hboutemy@apache.org>
Thu, 30 Oct 2014 06:18:51 +0000 (06:18 +0000)
committerHerve Boutemy <hboutemy@apache.org>
Thu, 30 Oct 2014 06:18:51 +0000 (06:18 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/shared/trunk@1635400 13f79535-47bb-0310-9956-ffa450edef68

pom.xml
src/main/java/org/apache/maven/shared/io/download/DefaultDownloadManager.java
src/main/java/org/apache/maven/shared/io/location/ClasspathResourceLocatorStrategy.java
src/main/java/org/apache/maven/shared/io/location/FileLocation.java
src/main/java/org/apache/maven/shared/io/logging/DefaultMessageHolder.java
src/main/java/org/apache/maven/shared/io/logging/MessageLevels.java
src/main/java/org/apache/maven/shared/io/logging/PlexusLoggerSink.java

diff --git a/pom.xml b/pom.xml
index 994363a..19e4d26 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.maven.shared</groupId>
     <artifactId>maven-shared-components</artifactId>
-    <version>20</version>
+    <version>21</version>
     <relativePath>../maven-shared-components/pom.xml</relativePath>
   </parent>
 
     </site>
   </distributionManagement>
 
+  <properties>
+    <checkstyle.violation.ignore>RedundantThrows,NewlineAtEndOfFile,ParameterNumber,MethodLength,FileLength,JavadocType</checkstyle.violation.ignore>
+  </properties>
+
   <dependencies>
     <!-- Maven -->
     <dependency>
index 9c8fa91..76afe9d 100644 (file)
@@ -85,7 +85,8 @@ public class DefaultDownloadManager
         }
         catch ( MalformedURLException e )
         {
-            throw new DownloadFailedException( url, "Download failed due to invalid URL. Reason: " + e.getMessage(), e );
+            throw new DownloadFailedException( url, "Download failed due to invalid URL. Reason: " + e.getMessage(),
+                                               e );
         }
 
         Wagon wagon = null;
index a224411..f56c135 100644 (file)
@@ -37,7 +37,8 @@ public class ClasspathResourceLocatorStrategy
     {
     }
 
-    public ClasspathResourceLocatorStrategy( String tempFilePrefix, String tempFileSuffix, boolean tempFileDeleteOnExit )
+    public ClasspathResourceLocatorStrategy( String tempFilePrefix, String tempFileSuffix,
+                                             boolean tempFileDeleteOnExit )
     {
         this.tempFilePrefix = tempFilePrefix;
         this.tempFileSuffix = tempFileSuffix;
index a9bc849..1d03a57 100644 (file)
@@ -67,7 +67,7 @@ public class FileLocation
             {
                 stream.close();
             }
-            catch( IOException e )
+            catch ( IOException e )
             {
                 // swallow it.
             }
index fe34953..b06a447 100644 (file)
@@ -29,7 +29,7 @@ public class DefaultMessageHolder
     implements MessageHolder
 {
 
-    private List messages = new ArrayList();
+    private List<Message> messages = new ArrayList<Message>();
 
     private Message currentMessage;
 
@@ -149,7 +149,7 @@ public class DefaultMessageHolder
         StringBuffer buffer = new StringBuffer();
 
         int counter = 1;
-        for ( Iterator it = messages.iterator(); it.hasNext(); )
+        for ( Iterator<Message> it = messages.iterator(); it.hasNext(); )
         {
             Message message = (Message) it.next();
 
@@ -364,9 +364,8 @@ public class DefaultMessageHolder
     {
         int count = 0;
 
-        for ( Iterator it = messages.iterator(); it.hasNext(); )
+        for ( Message message : messages )
         {
-            Message message = (Message) it.next();
             if ( messageLevel == message.getMessageLevel() )
             {
                 count++;
@@ -487,43 +486,34 @@ public class DefaultMessageHolder
 
     public void render( MessageSink sink )
     {
-        for ( Iterator it = messages.iterator(); it.hasNext(); )
+        for ( Message message : messages )
         {
-            Message message = (Message) it.next();
-
             renderTo( message, sink );
         }
     }
 
     protected void renderTo( Message message, MessageSink sink )
     {
-        switch( message.getMessageLevel() )
+        switch ( message.getMessageLevel() )
         {
-        case( MessageLevels.LEVEL_SEVERE ):
-        {
-            sink.severe( message.render().toString() );
-            break;
-        }
-        case( MessageLevels.LEVEL_ERROR ):
-        {
-            sink.error( message.render().toString() );
-            break;
-        }
-        case( MessageLevels.LEVEL_WARNING ):
-        {
-            sink.warning( message.render().toString() );
-            break;
-        }
-        case( MessageLevels.LEVEL_INFO ):
-        {
-            sink.info( message.render().toString() );
-            break;
-        }
-        default:
-        {
-            sink.debug( message.render().toString() );
-            break;
-        }
+            case ( MessageLevels.LEVEL_SEVERE ):
+                sink.severe( message.render().toString() );
+                break;
+
+            case ( MessageLevels.LEVEL_ERROR ):
+                sink.error( message.render().toString() );
+                break;
+
+            case ( MessageLevels.LEVEL_WARNING ):
+                sink.warning( message.render().toString() );
+                break;
+
+            case ( MessageLevels.LEVEL_INFO ):
+                sink.info( message.render().toString() );
+                break;
+
+            default:
+                sink.debug( message.render().toString() );
         }
     }
 
index 96253f1..cd20b6e 100644 (file)
@@ -24,7 +24,9 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
-
+/**
+ * 
+ */
 public final class MessageLevels
 {
 
@@ -35,11 +37,11 @@ public final class MessageLevels
     public static final int LEVEL_SEVERE = 4;
     public static final int LEVEL_DISABLED = 5;
 
-    private static final List LEVEL_NAMES;
+    private static final List<String> LEVEL_NAMES;
 
     static
     {
-        List names = new ArrayList();
+        List<String> names = new ArrayList<String>();
         names.add( "DEBUG" );
         names.add( "INFO" );
         names.add( "WARN" );
@@ -61,21 +63,17 @@ public final class MessageLevels
 
         switch ( maxMessageLevel )
         {
-        case (LEVEL_DEBUG): {
-            states[LEVEL_DEBUG] = true;
-        }
-        case (LEVEL_INFO): {
-            states[LEVEL_INFO] = true;
-        }
-        case (LEVEL_WARNING): {
-            states[LEVEL_WARNING] = true;
-        }
-        case (LEVEL_ERROR): {
-            states[LEVEL_ERROR] = true;
-        }
-        case (LEVEL_SEVERE): {
-            states[LEVEL_SEVERE] = true;
-        }
+            case ( LEVEL_DEBUG ):
+                states[LEVEL_DEBUG] = true;
+            case ( LEVEL_INFO ):
+                states[LEVEL_INFO] = true;
+            case ( LEVEL_WARNING ):
+                states[LEVEL_WARNING] = true;
+            case ( LEVEL_ERROR ):
+                states[LEVEL_ERROR] = true;
+            case ( LEVEL_SEVERE ):
+                states[LEVEL_SEVERE] = true;
+            default:
         }
 
         return states;
index 80edd13..a9ebdbd 100644 (file)
@@ -21,7 +21,9 @@ package org.apache.maven.shared.io.logging;
 
 import org.codehaus.plexus.logging.Logger;
 
-
+/**
+ * 
+ */
 public class PlexusLoggerSink
     implements MessageSink
 {