velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sdumit...@apache.org
Subject svn commit: r1654393 - /velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/EscapeReference.java
Date Fri, 23 Jan 2015 21:23:54 GMT
Author: sdumitriu
Date: Fri Jan 23 21:23:54 2015
New Revision: 1654393

URL: http://svn.apache.org/r1654393
Log:
Improved codestyle

Modified:
    velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/EscapeReference.java

Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/EscapeReference.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/EscapeReference.java?rev=1654393&r1=1654392&r2=1654393&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/EscapeReference.java
(original)
+++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/EscapeReference.java
Fri Jan 23 21:23:54 2015
@@ -57,7 +57,6 @@ public abstract class EscapeReference im
     private RuntimeServices rs;
 
     private String matchRegExp = null;
-    //private Pattern pattern = null;
 
     /**
      * Escape the given text.  Override this in a subclass to do the actual
@@ -117,18 +116,14 @@ public abstract class EscapeReference im
     {
         this.rs = rs;
 
-        /**
-         * Get the regular expression pattern.
-         */
+        // Get the regular expression pattern.
         matchRegExp = StringUtils.nullTrim(rs.getConfiguration().getString(getMatchAttribute()));
-        if ((matchRegExp != null) && (matchRegExp.length() == 0))
+        if (org.apache.commons.lang3.StringUtils.isEmpty(matchRegExp))
         {
             matchRegExp = null;
         }
 
-        /**
-         * Test the regular expression for a well formed pattern
-         */
+        // Test the regular expression for a well formed pattern
         if (matchRegExp != null)
         {
             try



Mime
View raw message