*/
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;
}
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;
*/
public final class DomUtils {
+ private static final Log LOG = LogFactory.getLog(DomUtils.class);
+
/**
* Disabled default constructor.
*
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);