From: erik Date: Fri, 31 Mar 2006 09:29:16 +0000 (+0000) Subject: (no commit message) X-Git-Tag: BEFORE_MAVEN_MIGRATION~115 X-Git-Url: http://wamblee.org/gitweb/?a=commitdiff_plain;h=5dbba73a4ee8b8816cd8b3b3908e254f2bb290a7;p=utils --- diff --git a/crawler/kiss/src/org/wamblee/crawler/kiss/guide/PrintVisitor.java b/crawler/kiss/src/org/wamblee/crawler/kiss/guide/PrintVisitor.java index ea1c3c22..028cdf55 100644 --- a/crawler/kiss/src/org/wamblee/crawler/kiss/guide/PrintVisitor.java +++ b/crawler/kiss/src/org/wamblee/crawler/kiss/guide/PrintVisitor.java @@ -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); } } diff --git a/crawler/kiss/src/org/wamblee/crawler/kiss/guide/Program.java b/crawler/kiss/src/org/wamblee/crawler/kiss/guide/Program.java index 3d6065f5..44bdc521 100644 --- a/crawler/kiss/src/org/wamblee/crawler/kiss/guide/Program.java +++ b/crawler/kiss/src/org/wamblee/crawler/kiss/guide/Program.java @@ -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; } diff --git a/support/src/org/wamblee/xml/DomUtils.java b/support/src/org/wamblee/xml/DomUtils.java index 3718debf..05eae128 100644 --- a/support/src/org/wamblee/xml/DomUtils.java +++ b/support/src/org/wamblee/xml/DomUtils.java @@ -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);