(no commit message)
authorerik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Fri, 31 Mar 2006 09:29:16 +0000 (09:29 +0000)
committererik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Fri, 31 Mar 2006 09:29:16 +0000 (09:29 +0000)
crawler/kiss/src/org/wamblee/crawler/kiss/guide/PrintVisitor.java
crawler/kiss/src/org/wamblee/crawler/kiss/guide/Program.java
support/src/org/wamblee/xml/DomUtils.java

index ea1c3c22cf51346cd60eb6803b913afb03b4b010..028cdf5506d8b350d2a6963029c815fa8d6c4470 100644 (file)
@@ -49,7 +49,7 @@ public class PrintVisitor extends AbstractVisitor {
      */
     @Override
     public void visitChannel(Channel aChannel) {
-        System.out.println(aChannel.getName());
+        _stream.println(aChannel.getName());
         super.visitChannel(aChannel);
     }
 }
index 3d6065f5b401677c790b5a7d815cb2be1c35792a..44bdc52110b6b36a9e5e59163d5d91553d6601d0 100644 (file)
@@ -231,11 +231,7 @@ public class Program {
      */
     public boolean isRecordingPossible() {
         try {
-            Action record = _programInfo.execute().getAction(RECORD_ACTION);
-            if (record == null) {
-                return false;
-            }
-            return true;
+            return _programInfo.execute().getAction(RECORD_ACTION) != null;
         } catch (PageException e) {
             return false;
         }
index 3718debf782529b075591a141813cd6e83162d98..05eae128640fa9b70a829a7e7c33814e379ca891 100644 (file)
@@ -30,6 +30,8 @@ import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.xml.serialize.OutputFormat;
 import org.apache.xml.serialize.XMLSerializer;
 import org.dom4j.DocumentException;
@@ -49,6 +51,8 @@ import org.xml.sax.SAXException;
  */
 public final class DomUtils {
     
+    private static final Log LOG = LogFactory.getLog(DomUtils.class);
+    
     /**
      * Disabled default constructor. 
      *
@@ -149,7 +153,7 @@ public final class DomUtils {
         for (int i = 0; i < attributes.getLength(); i++) {
             Attr attribute = (Attr) attributes.item(i);
             if (uniqueAttributes.containsKey(attribute.getNodeName())) {
-                System.out.println("Detected duplicate attribute '"
+                LOG.info("Detected duplicate attribute (will be removed)'"
                         + attribute.getNodeName() + "'");
             }
             uniqueAttributes.put(attribute.getNodeName(), attribute);