maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r620104 - /maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java
Date Sat, 09 Feb 2008 13:05:54 GMT
Author: vsiveton
Date: Sat Feb  9 05:05:53 2008
New Revision: 620104

URL: http://svn.apache.org/viewvc?rev=620104&view=rev
Log:
o prevent ArrayIndexOutOfBoundsException. 

Modified:
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java?rev=620104&r1=620103&r2=620104&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java
Sat Feb  9 05:05:53 2008
@@ -310,11 +310,14 @@
 
             String base = docName.substring( 0, docName.lastIndexOf( "/" ) );
 
-            while ( anchor.startsWith( "../" ) )
+            if ( base.indexOf( "/" ) != -1 )
             {
-                base = base.substring( 0, base.lastIndexOf( "/" ) );
+                while ( anchor.startsWith( "../" ) )
+                {
+                    base = base.substring( 0, base.lastIndexOf( "/" ) );
 
-                anchor = anchor.substring( 3 );
+                    anchor = anchor.substring( 3 );
+                }
             }
 
             // call again with resolved link



Mime
View raw message