maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1503871 - /maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/DistCheckSiteMojo.java
Date Tue, 16 Jul 2013 20:31:43 GMT
Author: hboutemy
Date: Tue Jul 16 20:31:42 2013
New Revision: 1503871

URL: http://svn.apache.org/r1503871
Log:
code simplification

Modified:
    maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/DistCheckSiteMojo.java

Modified: maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/DistCheckSiteMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/DistCheckSiteMojo.java?rev=1503871&r1=1503870&r2=1503871&view=diff
==============================================================================
--- maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/DistCheckSiteMojo.java
(original)
+++ maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/DistCheckSiteMojo.java
Tue Jul 16 20:31:42 2013
@@ -92,6 +92,7 @@ public class DistCheckSiteMojo
     protected boolean screenShot;
     
     private static final String MAVEN_SITE = "http://maven.apache.org";
+
     /**
      * Http status ok code.
      */
@@ -207,25 +208,26 @@ public class DistCheckSiteMojo
 
         private void getOverall( Sink sink )
         {
-
             if ( statusCode != HTTP_OK )
             {
                 iconError( sink );
             }
             else
             {
-                boolean tmp = false;
+                boolean found = false;
                 for ( Map.Entry<HTMLChecker, Boolean> e : checkMap.entrySet() )
                 {
-                    tmp = tmp || e.getValue();
-                }
-                if ( tmp )
-                {
-                    iconSuccess( sink );
+                    if ( e.getValue() )
+                    {
+                        iconSuccess( sink );
+                        sink.text( ": " + e.getKey().getName() );
+                        found = true;
+                    }
                 }
-                else
+                if ( !found )
                 {
                     iconWarning( sink );
+                    sink.text( ": artifact version not found" );
                 }
             }
         }
@@ -381,13 +383,6 @@ public class DistCheckSiteMojo
             
             sink.tableCell();
             csr.getOverall( sink );
-            for ( HTMLChecker c : checker )
-            {
-                if ( ( csr.getCheckMap().get( c ) != null ) && csr.getCheckMap().get(
c ) )
-                {
-                    sink.text( ": " + c.getName() );
-                }
-            }
             sink.tableCell_();
 
             sink.tableRow_();



Mime
View raw message