maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ltheu...@apache.org
Subject svn commit: r1061700 - /maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/xsd/AbstractXmlValidator.java
Date Fri, 21 Jan 2011 09:19:38 GMT
Author: ltheussl
Date: Fri Jan 21 09:19:37 2011
New Revision: 1061700

URL: http://svn.apache.org/viewvc?rev=1061700&view=rev
Log:
avoid deprecated logger calls

Modified:
    maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/xsd/AbstractXmlValidator.java

Modified: maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/xsd/AbstractXmlValidator.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/xsd/AbstractXmlValidator.java?rev=1061700&r1=1061699&r2=1061700&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/xsd/AbstractXmlValidator.java
(original)
+++ maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/xsd/AbstractXmlValidator.java
Fri Jan 21 09:19:37 2011
@@ -30,8 +30,10 @@ import java.util.Map;
 import junit.framework.AssertionFailedError;
 
 import org.apache.maven.doxia.parser.AbstractXmlParser;
+import org.apache.maven.doxia.parser.Parser;
 
 import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.logging.Logger;
 
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
@@ -98,13 +100,15 @@ public abstract class AbstractXmlValidat
     public void testValidateFiles()
         throws Exception
     {
+        final Logger logger = getContainer().getLoggerManager().getLoggerForComponent( Parser.ROLE
);
+
         for ( Iterator it = getTestDocuments().entrySet().iterator(); it.hasNext(); )
         {
             Map.Entry entry = (Map.Entry) it.next();
 
-            if ( getContainer().getLogger().isDebugEnabled() )
+            if ( logger.isDebugEnabled() )
             {
-                getContainer().getLogger().debug( "Validate '" + entry.getKey() + "'" );
+                logger.debug( "Validate '" + entry.getKey() + "'" );
             }
 
             List errors = parseXML( entry.getValue().toString() );
@@ -119,9 +123,9 @@ public abstract class AbstractXmlValidat
                 }
                 else
                 {
-                    if ( getContainer().getLogger().isDebugEnabled() )
+                    if ( logger.isDebugEnabled() )
                     {
-                        getContainer().getLogger().debug( entry.getKey() + EOL + error.toString()
);
+                        logger.debug( entry.getKey() + EOL + error.toString() );
                     }
                 }
             }



Mime
View raw message