maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ltheu...@apache.org
Subject svn commit: r1002545 - in /maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck: DefaultLinkCheck.java validation/LinkValidatorManager.java validation/OfflineHTTPLinkValidator.java
Date Wed, 29 Sep 2010 09:53:15 GMT
Author: ltheussl
Date: Wed Sep 29 09:53:15 2010
New Revision: 1002545

URL: http://svn.apache.org/viewvc?rev=1002545&view=rev
Log:
sanitize logger calls, formatting.

Modified:
    maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/DefaultLinkCheck.java
    maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/validation/LinkValidatorManager.java
    maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/validation/OfflineHTTPLinkValidator.java

Modified: maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/DefaultLinkCheck.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/DefaultLinkCheck.java?rev=1002545&r1=1002544&r2=1002545&view=diff
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/DefaultLinkCheck.java
(original)
+++ maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/DefaultLinkCheck.java
Wed Sep 29 09:53:15 2010
@@ -188,9 +188,9 @@ public final class DefaultLinkCheck
     }
 
     /** {@inheritDoc} */
-    public void setReportOutputEncoding( String enc )
+    public void setReportOutputEncoding( String encoding )
     {
-        this.reportOutputEncoding = enc;
+        this.reportOutputEncoding = encoding;
     }
 
     /** {@inheritDoc} */
@@ -199,20 +199,14 @@ public final class DefaultLinkCheck
     {
         if ( this.basedir == null )
         {
-            if ( LOG.isErrorEnabled() )
-            {
-                LOG.error( "No base directory specified!" );
-            }
+            LOG.error( "No base directory specified!" );
 
             throw new NullPointerException( "The basedir can't be null!" );
         }
 
         if ( this.reportOutput == null )
         {
-            if ( LOG.isWarnEnabled() )
-            {
-                LOG.warn( "No output file specified! Results will not be written!" );
-            }
+            LOG.warn( "No output file specified! Results will not be written!" );
         }
 
         LinkcheckModel model = new LinkcheckModel();
@@ -233,17 +227,11 @@ public final class DefaultLinkCheck
 
         displayMemoryConsumption();
 
-        if ( LOG.isInfoEnabled() )
-        {
-            LOG.info( "Begin to check links in files..." );
-        }
+        LOG.info( "Begin to check links in files..." );
 
         findAndCheckFiles( this.basedir, model );
 
-        if ( LOG.isInfoEnabled() )
-        {
-            LOG.info( "Links checked." );
-        }
+        LOG.info( "Links checked." );
 
         displayMemoryConsumption();
 
@@ -524,14 +512,8 @@ public final class DefaultLinkCheck
             // We catch Throwable, because there is a chance that the domReader will throw
             // a stack overflow exception for some files
 
-            if ( LOG.isDebugEnabled() )
-            {
-                LOG.error( "Received: [" + t + "] in page [" + linkcheckFile.getRelativePath()
+ "]", t );
-            }
-            else
-            {
-                LOG.error( "Received: [" + t + "] in page [" + linkcheckFile.getRelativePath()
+ "]" );
-            }
+            LOG.error( "Received: [" + t + "] in page [" + linkcheckFile.getRelativePath()
+ "]" );
+            LOG.debug( t.getMessage(), t );
 
             LinkcheckFileResult lcr = new LinkcheckFileResult();
 

Modified: maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/validation/LinkValidatorManager.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/validation/LinkValidatorManager.java?rev=1002545&r1=1002544&r2=1002545&view=diff
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/validation/LinkValidatorManager.java
(original)
+++ maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/validation/LinkValidatorManager.java
Wed Sep 29 09:53:15 2010
@@ -201,28 +201,19 @@ public class LinkValidatorManager
     {
         if ( cacheFile == null )
         {
-            if ( LOG.isDebugEnabled() )
-            {
-                LOG.debug( "No cache file specified! Ignoring request to load." );
-            }
+            LOG.debug( "No cache file specified! Ignoring request to load." );
             return;
         }
 
         if ( !cacheFile.exists() )
         {
-            if ( LOG.isDebugEnabled() )
-            {
-                LOG.debug( "Specified cache file does not exist! Ignoring request to load."
);
-            }
+            LOG.debug( "Specified cache file does not exist! Ignoring request to load." );
             return;
         }
 
         if ( cacheFile.isDirectory() )
         {
-            if ( LOG.isDebugEnabled() )
-            {
-                LOG.debug( "Cache file is a directory! Ignoring request to load." );
-            }
+            LOG.debug( "Cache file is a directory! Ignoring request to load." );
             return;
         }
 
@@ -240,10 +231,7 @@ public class LinkValidatorManager
         }
         catch ( InvalidClassException e )
         {
-            if ( LOG.isWarnEnabled() )
-            {
-                LOG.warn( "Your cache is incompatible with this version of linkcheck. It
will be recreated." );
-            }
+            LOG.warn( "Your cache is incompatible with this version of linkcheck. It will
be recreated." );
         }
         catch ( ClassNotFoundException e )
         {
@@ -270,19 +258,13 @@ public class LinkValidatorManager
     {
         if ( cacheFile == null )
         {
-            if ( LOG.isWarnEnabled() )
-            {
-                LOG.warn( "No cache file specified! Ignoring request to store results." );
-            }
+            LOG.warn( "No cache file specified! Ignoring request to store results." );
             return;
         }
 
         if ( cacheFile.isDirectory() )
         {
-            if ( LOG.isDebugEnabled() )
-            {
-                LOG.debug( "Cache file is a directory! Ignoring request to load." );
-            }
+            LOG.debug( "Cache file is a directory! Ignoring request to load." );
             return;
         }
 

Modified: maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/validation/OfflineHTTPLinkValidator.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/validation/OfflineHTTPLinkValidator.java?rev=1002545&r1=1002544&r2=1002545&view=diff
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/validation/OfflineHTTPLinkValidator.java
(original)
+++ maven/doxia/doxia-tools/trunk/doxia-linkcheck/src/main/java/org/apache/maven/doxia/linkcheck/validation/OfflineHTTPLinkValidator.java
Wed Sep 29 09:53:15 2010
@@ -34,6 +34,6 @@ public final class OfflineHTTPLinkValida
     public LinkValidationResult validateLink( LinkValidationItem lvi )
     {
         return new LinkValidationResult( LinkcheckFileResult.WARNING_LEVEL, false,
-                                         "Maven is offline. Link not checked." );
+                                         "Running offline. Link not checked." );
     }
 }



Mime
View raw message