summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.test/tst
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2018-09-25 21:01:24 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2018-09-26 08:31:13 +0900
commitdbabe5f37a547ea1557ad0eedd9cc5d525a1c1ff (patch)
tree836904d10185d572403cfa8876b6ed154b7eed18 /org.eclipse.jgit.http.test/tst
parent2f1350c9ac51f421e5642915716f43e732c4eb14 (diff)
downloadjgit-dbabe5f37a547ea1557ad0eedd9cc5d525a1c1ff.tar.gz
jgit-dbabe5f37a547ea1557ad0eedd9cc5d525a1c1ff.zip
Explicitly specify charset in constructor of InputStreamReader
Change-Id: Id43e27c590f41f7435c2ca1d127f27e45745da7f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.http.test/tst')
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RegexPipelineTest.java19
1 files changed, 13 insertions, 6 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RegexPipelineTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RegexPipelineTest.java
index 725a5902df..ad02cd311d 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RegexPipelineTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RegexPipelineTest.java
@@ -43,6 +43,7 @@
package org.eclipse.jgit.http.test;
+import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertEquals;
import java.io.BufferedReader;
@@ -120,7 +121,8 @@ public class RegexPipelineTest extends HttpTestCase {
c = ((HttpURLConnection) uri.resolve("/a").toURL()
.openConnection());
assertEquals(200, c.getResponseCode());
- r = new BufferedReader(new InputStreamReader(c.getInputStream()));
+ r = new BufferedReader(
+ new InputStreamReader(c.getInputStream(), UTF_8));
assertEquals("test", r.readLine());
assertEquals("", r.readLine());
assertEquals("/a", r.readLine());
@@ -129,7 +131,8 @@ public class RegexPipelineTest extends HttpTestCase {
c = ((HttpURLConnection) uri.resolve("/b").toURL()
.openConnection());
assertEquals(200, c.getResponseCode());
- r = new BufferedReader(new InputStreamReader(c.getInputStream()));
+ r = new BufferedReader(
+ new InputStreamReader(c.getInputStream(), UTF_8));
assertEquals("test", r.readLine());
assertEquals("", r.readLine());
assertEquals("/b", r.readLine());
@@ -155,7 +158,8 @@ public class RegexPipelineTest extends HttpTestCase {
c = ((HttpURLConnection) uri.resolve("/a").toURL()
.openConnection());
assertEquals(200, c.getResponseCode());
- r = new BufferedReader(new InputStreamReader(c.getInputStream()));
+ r = new BufferedReader(
+ new InputStreamReader(c.getInputStream(), UTF_8));
assertEquals("test1", r.readLine());
assertEquals("", r.readLine());
assertEquals("/a", r.readLine());
@@ -183,7 +187,8 @@ public class RegexPipelineTest extends HttpTestCase {
c = ((HttpURLConnection) uri.resolve("/a/b").toURL()
.openConnection());
assertEquals(200, c.getResponseCode());
- r = new BufferedReader(new InputStreamReader(c.getInputStream()));
+ r = new BufferedReader(
+ new InputStreamReader(c.getInputStream(), UTF_8));
assertEquals("test1", r.readLine());
assertEquals("", r.readLine());
// No RegexGroupFilter defaults to first group.
@@ -193,7 +198,8 @@ public class RegexPipelineTest extends HttpTestCase {
c = ((HttpURLConnection) uri.resolve("/c/d").toURL()
.openConnection());
assertEquals(200, c.getResponseCode());
- r = new BufferedReader(new InputStreamReader(c.getInputStream()));
+ r = new BufferedReader(
+ new InputStreamReader(c.getInputStream(), UTF_8));
assertEquals("test2", r.readLine());
assertEquals("", r.readLine());
assertEquals("/c", r.readLine());
@@ -202,7 +208,8 @@ public class RegexPipelineTest extends HttpTestCase {
c = ((HttpURLConnection) uri.resolve("/e/f/g").toURL()
.openConnection());
assertEquals(200, c.getResponseCode());
- r = new BufferedReader(new InputStreamReader(c.getInputStream()));
+ r = new BufferedReader(
+ new InputStreamReader(c.getInputStream(), UTF_8));
assertEquals("test3", r.readLine());
assertEquals("/e/f", r.readLine());
assertEquals("/g", r.readLine());