You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2008/10/28 08:49:37 UTC
svn commit: r708468 -
/geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/LoggingProcessor.java
Author: jdillon
Date: Tue Oct 28 00:49:37 2008
New Revision: 708468
URL: http://svn.apache.org/viewvc?rev=708468&view=rev
Log:
Apply patch from GSHELL-121
Modified:
geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/LoggingProcessor.java
Modified: geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/LoggingProcessor.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/LoggingProcessor.java?rev=708468&r1=708467&r2=708468&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/LoggingProcessor.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/LoggingProcessor.java Tue Oct 28 00:49:37 2008
@@ -126,7 +126,12 @@
if (prettyPrint) {
// workaround for bug in JDK 1.5
- transformerFactory.setAttribute("indent-number", indentSize);
+ try {
+ transformerFactory.setAttribute("indent-number", indentSize);
+ }
+ catch (IllegalArgumentException e) {
+ // ignore
+ }
}
Transformer transformer = transformerFactory.newTransformer();
@@ -134,9 +139,14 @@
StreamResult result = new StreamResult(writer);
if (prettyPrint) {
- transformer.setOutputProperty(OutputKeys.INDENT, "yes");
- String indentSize = Integer.toString(this.indentSize);
- transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", indentSize);
+ try {
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ String indentSize = Integer.toString(this.indentSize);
+ transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", indentSize);
+ }
+ catch (IllegalArgumentException e) {
+ // ignore
+ }
}
transformer.transform(source, result);
@@ -836,4 +846,4 @@
}
};
}
-}
\ No newline at end of file
+}