commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r788259 - in /commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/translate: EscapeLowAsciiAsUnicode.java EscapeNonAsciiAsUnicode.java EscapeUtils.java
Date Thu, 25 Jun 2009 05:00:39 GMT
Author: bayard
Date: Thu Jun 25 05:00:39 2009
New Revision: 788259

URL: http://svn.apache.org/viewvc?rev=788259&view=rev
Log:
Removing unnecessary Escape*AsciiAsUnicode classes. UnicodeEscaper now handles the range concept
directly and the ctrl character lookup table is now a direct LookupTranslator defined in EscapeUtils.
cf LANG-505

Removed:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/translate/EscapeLowAsciiAsUnicode.java
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/translate/EscapeNonAsciiAsUnicode.java
Modified:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/translate/EscapeUtils.java

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/translate/EscapeUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/translate/EscapeUtils.java?rev=788259&r1=788258&r2=788259&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/translate/EscapeUtils.java
(original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/translate/EscapeUtils.java
Thu Jun 25 05:00:39 2009
@@ -59,8 +59,15 @@
                             {"\\", "\\\\"},
                             {"/", "\\/"}
                       }),
-            new EscapeLowAsciiAsUnicode(),
-            new EscapeNonAsciiAsUnicode()
+            new LookupTranslator(
+                      new String[][] {
+                            {"\b", "\\b"},
+                            {"\n", "\\n"},
+                            {"\t", "\\t"},
+                            {"\f", "\\f"},
+                            {"\r", "\\r"}
+                      }),
+            UnicodeEscaper.outsideOf(32, 0x7f) 
         );
             
     public static final String escapeEcmaScript(String input) {



Mime
View raw message