maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r391965 - /maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
Date Thu, 06 Apr 2006 11:14:29 GMT
Author: brett
Date: Thu Apr  6 04:14:25 2006
New Revision: 391965

URL: http://svn.apache.org/viewcvs?rev=391965&view=rev
Log:
fix class cast exception

Modified:
    maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java

Modified: maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java?rev=391965&r1=391964&r2=391965&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
(original)
+++ maven/doxia/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
Thu Apr  6 04:14:25 2006
@@ -148,7 +148,8 @@
 
                     if ( moduleExcludes != null && moduleExcludes.containsKey( module.getParserId()
) )
                     {
-                        addModuleFiles( moduleBasedir, module, (String)moduleExcludes.get(
module.getParserId() ), files );
+                        addModuleFiles( moduleBasedir, module, (String) moduleExcludes.get(
module.getParserId() ),
+                                        files );
                     }
                     else
                     {
@@ -166,11 +167,13 @@
             {
                 if ( moduleExcludes != null && moduleExcludes.containsKey( module.getParserId()
) )
                 {
-                    addModuleFiles( module.getBasedir(), siteModuleManager.getSiteModule(
module.getParserId() ), (String)moduleExcludes.get( module.getParserId() ), files );
+                    addModuleFiles( module.getBasedir(), siteModuleManager.getSiteModule(
module.getParserId() ),
+                                    (String) moduleExcludes.get( module.getParserId() ),
files );
                 }
                 else
                 {
-                    addModuleFiles( module.getBasedir(), siteModuleManager.getSiteModule(
module.getParserId() ), null, files );
+                    addModuleFiles( module.getBasedir(), siteModuleManager.getSiteModule(
module.getParserId() ), null,
+                                    files );
                 }
             }
             catch ( SiteModuleNotFoundException e )
@@ -198,7 +201,8 @@
 
                 if ( files.containsKey( key ) )
                 {
-                    RenderingContext originalContext = (RenderingContext) files.get( key
);
+                    DocumentRenderer renderer = (DocumentRenderer) files.get( key );
+                    RenderingContext originalContext = renderer.getRenderingContext();
                     File originalDoc = new File( originalContext.getBasedir(), originalContext.getInputName()
);
                     throw new RendererException( "Files '" + doc + "' clashes with existing
'" + originalDoc + "'" );
                 }
@@ -218,10 +222,9 @@
 
             RenderingContext renderingContext = docRenderer.getRenderingContext();
 
-            File outputFile = new File ( outputDirectory, docRenderer.getOutputName() );
-
-            File inputFile = new File ( renderingContext.getBasedir(), renderingContext.getInputName()
);
+            File outputFile = new File( outputDirectory, docRenderer.getOutputName() );
 
+            File inputFile = new File( renderingContext.getBasedir(), renderingContext.getInputName()
);
 
             if ( !outputFile.exists() || inputFile.lastModified() > outputFile.lastModified()
)
             {
@@ -270,7 +273,8 @@
         }
         catch ( ParseException e )
         {
-            getLogger().error( "Error parsing " + fullPathDoc + ": line [" + e.getLineNumber()
+ "] " + e.getMessage() , e );
+            getLogger().error( "Error parsing " + fullPathDoc + ": line [" + e.getLineNumber()
+ "] " + e.getMessage(),
+                               e );
         }
         finally
         {



Mime
View raw message