directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r945221 - /directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java
Date Mon, 17 May 2010 15:48:38 GMT
Author: felixk
Date: Mon May 17 15:48:38 2010
New Revision: 945221

URL: http://svn.apache.org/viewvc?rev=945221&view=rev
Log:
If for whatever reason the pretty print transformation fails return the original document
and avoid NPEs

Modified:
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java?rev=945221&r1=945220&r2=945221&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java
(original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java
Mon May 17 15:48:38 2010
@@ -269,7 +269,7 @@ public class ParserUtils
 
 
     /**
-     * XML Pretty Printer XSLT Tranformation
+     * XML Pretty Printer XSLT Transformation
      * 
      * @param document
      *      the Dom4j Document
@@ -288,8 +288,9 @@ public class ParserUtils
         }
         catch ( TransformerConfigurationException e1 )
         {
-            // TODO Auto-generated catch block
             e1.printStackTrace();
+            // return original document
+            return document;
         }
 
         // now lets style the given document
@@ -301,8 +302,9 @@ public class ParserUtils
         }
         catch ( TransformerException e )
         {
-            // TODO Auto-generated catch block
             e.printStackTrace();
+            // return original document
+            return document;
         }
 
         // return the transformed document



Mime
View raw message