diff options
author | XinTong Wang <xintong@ca.ibm.com> | 2015-12-08 15:03:26 -0500 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2016-03-03 01:43:02 +0100 |
commit | 770d36c8bafba2ad20686c161246a3a239cdf1d9 (patch) | |
tree | 321c15c91a7e17b61a05af454545e0ac44e4b4c3 /org.eclipse.jgit.junit/src | |
parent | be8c525fa0664d429e23cbf070420cb84a4a1607 (diff) | |
download | jgit-770d36c8bafba2ad20686c161246a3a239cdf1d9.tar.gz jgit-770d36c8bafba2ad20686c161246a3a239cdf1d9.zip |
Fix apply patch which did not work with non-ascii characters
Bug: 483943
Change-Id: If28f64053d20ab1bee54245f223e952dc2fe392c
Signed-off-by: XinTong Wang <xintong@ca.ibm.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.junit/src')
-rw-r--r-- | org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java index 0db71f7cbc..86b87b4075 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java @@ -144,10 +144,10 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { protected static void checkFile(File f, final String checkData) throws IOException { - Reader r = new InputStreamReader(new FileInputStream(f), "ISO-8859-1"); + Reader r = new InputStreamReader(new FileInputStream(f), "UTF-8"); try { - char[] data = new char[(int) f.length()]; - if (f.length() != r.read(data)) + char[] data = new char[checkData.length()]; + if (checkData.length() != r.read(data)) throw new IOException("Internal error reading file data from "+f); assertEquals(checkData, new String(data)); } finally { |