Author: vsiveton
Date: Sat May 19 06:24:43 2007
New Revision: 539750

URL: http://svn.apache.org/viewvc?view=rev&rev=539750
Log:
MPIR-57: URLs only link if they are FQDNs

o added tableCellForUrl() which creates a cell with a link without link 
verification
o developer/contributor url and organizationUrl have no more verification

Modified:
    
maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/TeamListReport.java

Modified: 
maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/TeamListReport.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/TeamListReport.java?view=diff&rev=539750&r1=539749&r2=539750
==============================================================================
--- 
maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/TeamListReport.java
 (original)
+++ 
maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/TeamListReport.java
 Sat May 19 06:24:43 2007
@@ -198,7 +198,7 @@
                     }
                     if ( headersMap.get( URL ) == Boolean.TRUE )
                     {
-                        tableCell( createLinkPatternedText( 
developer.getUrl(), developer.getUrl() ) );
+                        tableCellForUrl( developer.getUrl() );
                     }
                     if ( headersMap.get( ORGANIZATION ) == Boolean.TRUE )
                     {
@@ -206,8 +206,7 @@
                     }
                     if ( headersMap.get( ORGANIZATION_URL ) == Boolean.TRUE )
                     {
-                        tableCell( createLinkPatternedText( 
developer.getOrganizationUrl(), developer
-                            .getOrganizationUrl() ) );
+                        tableCellForUrl( developer.getOrganizationUrl() );
                     }
                     if ( headersMap.get( ROLES ) == Boolean.TRUE )
                     {
@@ -300,7 +299,7 @@
                     }
                     if ( headersMap.get( URL ) == Boolean.TRUE )
                     {
-                        tableCell( createLinkPatternedText( 
contributor.getUrl(), contributor.getUrl() ) );
+                        tableCellForUrl( contributor.getUrl() );
                     }
                     if ( headersMap.get( ORGANIZATION ) == Boolean.TRUE )
                     {
@@ -308,8 +307,7 @@
                     }
                     if ( headersMap.get( ORGANIZATION_URL ) == Boolean.TRUE )
                     {
-                        tableCell( createLinkPatternedText( 
contributor.getOrganizationUrl(), contributor
-                            .getOrganizationUrl() ) );
+                        tableCellForUrl( contributor.getOrganizationUrl() );
                     }
                     if ( headersMap.get( ROLES ) == Boolean.TRUE )
                     {
@@ -588,6 +586,27 @@
                     requiredHeaders.put( PROPERTIES, Boolean.TRUE );
                 }
             }
+        }
+
+        /**
+         * Create a table cell with a link to the given url. The url is not 
validated.
+         *
+         * @param url
+         */
+        private void tableCellForUrl( String url )
+        {
+            sink.tableCell();
+
+            if ( StringUtils.isEmpty( url ) )
+            {
+                text( url );
+            }
+            else
+            {
+                link( url, url );
+            }
+
+            sink.tableCell_();
         }
     }
 }


Reply via email to