ozeigermann 2004/04/26 03:00:16
Modified: webdavclient/clientlib/src/java/org/apache/util
XMLDebugOutputer.java
Log:
Applied patch by Thomas Bernert to address issue #28592
Revision Changes Path
1.2 +13 -9
jakarta-slide/webdavclient/clientlib/src/java/org/apache/util/XMLDebugOutputer.java
Index: XMLDebugOutputer.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/webdavclient/clientlib/src/java/org/apache/util/XMLDebugOutputer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XMLDebugOutputer.java 22 Apr 2004 07:02:48 -0000 1.1
+++ XMLDebugOutputer.java 26 Apr 2004 10:00:16 -0000 1.2
@@ -88,9 +88,11 @@
*/
public void print(Document doc) {
- Node root = doc.getDocumentElement();
-
- dispatchNode(root, 0);
+ if (debug) {
+ Node root = doc.getDocumentElement();
+
+ dispatchNode(root, 0);
+ }
}
/**
@@ -99,12 +101,14 @@
*/
public void print(String xmlString) {
- try {
- Document doc = db.parse(new InputSource(new StringReader(xmlString)));
- print(doc);
-
- } catch (SAXException e) {
- } catch (IOException e) {
+ if (debug) {
+ try {
+ Document doc = db.parse(new InputSource(new
StringReader(xmlString)));
+ print(doc);
+
+ } catch (SAXException e) {
+ } catch (IOException e) {
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]