asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mb...@apache.org
Subject asterixdb git commit: Read Test Resources as UTF-8
Date Fri, 19 Aug 2016 07:51:46 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 169281793 -> 7a180bc25


Read Test Resources as UTF-8

Change-Id: I0e0bfe916632a7783decd84420bba38ec3efac06
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1090
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/7a180bc2
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/7a180bc2
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/7a180bc2

Branch: refs/heads/master
Commit: 7a180bc254f70ce3fe3dfd088a169ec625cd7c4f
Parents: 1692817
Author: Michael Blow <mblow@apache.org>
Authored: Thu Aug 18 04:21:59 2016 -0400
Committer: Michael Blow <mblow@apache.org>
Committed: Fri Aug 19 00:51:11 2016 -0700

----------------------------------------------------------------------
 .../test/java/org/apache/asterix/test/aql/TestExecutor.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7a180bc2/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
index 45a5fc4..3321065 100644
--- a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
+++ b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
@@ -23,7 +23,6 @@ import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
-import java.io.FileReader;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.PrintWriter;
@@ -423,8 +422,9 @@ public class TestExecutor {
     // and returns the contents as a string
     // This string is later passed to REST API for execution.
     public String readTestFile(File testFile) throws Exception {
-        BufferedReader reader = new BufferedReader(new FileReader(testFile));
-        String line = null;
+        BufferedReader reader =
+                new BufferedReader(new InputStreamReader(new FileInputStream(testFile), StandardCharsets.UTF_8));
+        String line;
         StringBuilder stringBuilder = new StringBuilder();
         String ls = System.getProperty("line.separator");
         while ((line = reader.readLine()) != null) {


Mime
View raw message