velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbris...@apache.org
Subject svn commit: r1783729 - in /velocity/engine/trunk/velocity-engine-core/src: main/java/org/apache/velocity/util/ExtProperties.java main/java/org/apache/velocity/util/StringUtils.java test/java/org/apache/velocity/test/BaseTestCase.java
Date Mon, 20 Feb 2017 08:57:19 GMT
Author: cbrisson
Date: Mon Feb 20 08:57:19 2017
New Revision: 1783729

URL: http://svn.apache.org/viewvc?rev=1783729&view=rev
Log:
[engine] fix compilation and tests after last commits

Modified:
    velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
    velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/StringUtils.java
    velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/BaseTestCase.java

Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java?rev=1783729&r1=1783728&r2=1783729&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
(original)
+++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
Mon Feb 20 08:57:19 2017
@@ -26,6 +26,7 @@ import java.io.OutputStream;
 import java.io.PrintWriter;
 import java.io.Reader;
 import java.io.UnsupportedEncodingException;
+import java.nio.charset.StandardCharsets;
 import java.security.AccessController;
 import java.util.ArrayList;
 import java.util.Enumeration;

Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/StringUtils.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/StringUtils.java?rev=1783729&r1=1783728&r2=1783729&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/StringUtils.java
(original)
+++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/StringUtils.java
Mon Feb 20 08:57:19 2017
@@ -23,8 +23,6 @@ import org.apache.velocity.runtime.direc
 import org.apache.velocity.runtime.parser.node.Node;
 import org.apache.velocity.util.introspection.Info;
 
-import org.apache.commons.lang3.StringUtils;
-
 /**
  * This class provides some methods for dynamically
  * invoking methods in objects, and some string
@@ -77,7 +75,7 @@ public class StringUtils
     public static String formatFileString(String template, int linenum, int colnum)
     {
         StringBuilder buffer = new StringBuilder();
-        if (StringUtils.isEmpty(template))
+        if (org.apache.commons.lang3.StringUtils.isEmpty(template))
         {
             template = "<unknown template>";
         }

Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/BaseTestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/BaseTestCase.java?rev=1783729&r1=1783728&r2=1783729&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/BaseTestCase.java
(original)
+++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/BaseTestCase.java
Mon Feb 20 08:57:19 2017
@@ -34,6 +34,7 @@ import java.io.IOException;
 import java.io.StringWriter;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.Locale;
 
 /**
@@ -467,11 +468,11 @@ public abstract class BaseTestCase exten
 
     protected String getFileContents(String file)
     {
-        String contents;
+        String contents = null;
 
         try
         {
-            contents = new String(Files.readAllBytes(path), StandardCharsets.UTF_8);
+            contents = new String(Files.readAllBytes(Paths.get(file)), StandardCharsets.UTF_8);
         }
         catch (Exception e)
         {



Mime
View raw message