velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nbu...@apache.org
Subject svn commit: r753458 - /velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/BaseTestCase.java
Date Fri, 13 Mar 2009 22:30:48 GMT
Author: nbubna
Date: Fri Mar 13 22:30:48 2009
New Revision: 753458

URL: http://svn.apache.org/viewvc?rev=753458&view=rev
Log:
don't need oro, since 2.0 is on JDK5

Modified:
    velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/BaseTestCase.java

Modified: velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/BaseTestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/BaseTestCase.java?rev=753458&r1=753457&r2=753458&view=diff
==============================================================================
--- velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/BaseTestCase.java (original)
+++ velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/BaseTestCase.java Fri
Mar 13 22:30:48 2009
@@ -26,7 +26,6 @@
 import java.util.Iterator;
 import java.util.List;
 import junit.framework.TestCase;
-import org.apache.oro.text.perl.Perl5Util;
 import org.apache.velocity.VelocityContext;
 import org.apache.velocity.app.Velocity;
 import org.apache.velocity.app.VelocityEngine;
@@ -421,19 +420,16 @@
     }
 
 
-    //TODO: drop this for JDK regex once we move to JDK 1.5
-    private static Perl5Util perl = new Perl5Util();
     /**
      * Normalizes lines to account for platform differences.  Macs use
      * a single \r, DOS derived operating systems use \r\n, and Unix
      * uses \n.  Replace each with a single \n.
      *
-     * @author <a href="mailto:rubys@us.ibm.com">Sam Ruby</a>
      * @return source with all line terminations changed to Unix style
      */
     protected String normalizeNewlines (String source)
     {
-        return perl.substitute("s/\r[\r]?[\n]/\n/g", source);
+        return source.replaceAll("\r\n?", "\n");
     }
 
     /**



Mime
View raw message