Author: mperham
Date: Mon Apr 17 08:47:04 2006
New Revision: 394715

URL: http://svn.apache.org/viewcvs?rev=394715&view=rev
Log:
PR: MPMD-25
Submitted by: Fabian Bauschulte
Fix \ characters in URLs

Modified:
    
maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/CpdReportGenerator.java

Modified: 
maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/CpdReportGenerator.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/CpdReportGenerator.java?rev=394715&r1=394714&r2=394715&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/CpdReportGenerator.java
 (original)
+++ 
maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/CpdReportGenerator.java
 Mon Apr 17 08:47:04 2006
@@ -105,7 +105,7 @@
 
             if ( xrefLocation != null )
             {
-                sink.link( xrefLocation + "/" + filename1.replaceAll( 
"\\.java$", ".html" ) + "#" + line1 );
+                sink.link( xrefLocation + "/" + filename1.replaceAll( 
"\\.java$", ".html" ).replace( '\\', '/' ) + "#" + line1 );
             }
             sink.text( String.valueOf( line1 ) );
             if ( xrefLocation != null )
@@ -124,7 +124,7 @@
             sink.tableCell();
             if ( xrefLocation != null )
             {
-                sink.link( xrefLocation + "/" + filename2.replaceAll( 
"\\.java$", ".html" ) + "#" + line2 );
+                sink.link( xrefLocation + "/" + filename2.replaceAll( 
"\\.java$", ".html" ).replace( '\\', '/' ) + "#" + line2 );
             }
             sink.text( String.valueOf( line2 ) );
             if ( xrefLocation != null )


Reply via email to