[Mulgara-svn] r2051 - trunk/src/jar/query/java/org/jrdf/util

pag at mulgara.org pag at mulgara.org
Wed Sep 28 13:39:38 UTC 2011


Author: pag
Date: 2011-09-28 13:39:38 +0000 (Wed, 28 Sep 2011)
New Revision: 2051

Modified:
   trunk/src/jar/query/java/org/jrdf/util/EscapeUtil.java
Log:
Changed System.out to logging output on error

Modified: trunk/src/jar/query/java/org/jrdf/util/EscapeUtil.java
===================================================================
--- trunk/src/jar/query/java/org/jrdf/util/EscapeUtil.java	2011-09-28 13:39:25 UTC (rev 2050)
+++ trunk/src/jar/query/java/org/jrdf/util/EscapeUtil.java	2011-09-28 13:39:38 UTC (rev 2051)
@@ -3,6 +3,8 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.log4j.Logger;
+
 /**
  * A utility which applies N-Triples escaping.
  *
@@ -11,6 +13,10 @@
  * @version $Revision: 624 $
  */
 public class EscapeUtil {
+
+  /** Logger.  */
+  private static final Logger logger = Logger.getLogger(EscapeUtil.class.getName());
+
   /**
    * A regular expression to pick out characters needing escape from Unicode to
    * ASCII.  A different regular expression is used depending on which version of the JDK is detected - Java 1.4 has
@@ -31,10 +37,9 @@
                       "|" +
                       "[\\x00-\\x1F\\x22\\\\\\x7F-\\uFFFF]");
           }
+      } catch (Exception e) {
+          logger.error("Unable to initialize Regex pattern", e);
       }
-      catch (Exception e) {
-          e.printStackTrace();
-      }
   }
 
   /**



More information about the Mulgara-svn mailing list