geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r708468 - /geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/LoggingProcessor.java
Date Tue, 28 Oct 2008 07:49:37 GMT
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
+}



Mime
View raw message