summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2018-03-13 14:21:29 +0900
committerMatthias Sohn <matthias.sohn@sap.com>2018-03-13 22:21:35 +0100
commitda3d76f00ede01a976dbe1089f073a9c0f1c13a7 (patch)
tree646997d132e8ca442116692a2a94df081d0f4f9c /org.eclipse.jgit.test
parentbf757cd1c6202aa6b891bdc47c206039cbf798f0 (diff)
downloadjgit-da3d76f00ede01a976dbe1089f073a9c0f1c13a7.tar.gz
jgit-da3d76f00ede01a976dbe1089f073a9c0f1c13a7.zip
Use CHARSET in FileOutputStream instead of hard-coded "UTF-8"
Change-Id: I63ad25e1ebd94081c8848f4d21044cf9041f971d Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/NetRCTest.java3
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/NetRCTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/NetRCTest.java
index 77cb726f1e..76404aba91 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/NetRCTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/NetRCTest.java
@@ -42,6 +42,7 @@
package org.eclipse.jgit.transport;
+import static org.eclipse.jgit.lib.Constants.CHARSET;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
@@ -75,7 +76,7 @@ public class NetRCTest extends RepositoryTestCase {
private void config(final String data) throws IOException {
try (OutputStreamWriter fw = new OutputStreamWriter(
- new FileOutputStream(configFile), "UTF-8")) {
+ new FileOutputStream(configFile), CHARSET)) {
fw.write(data);
}
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
index d604751fef..886f577d98 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
@@ -43,6 +43,7 @@
package org.eclipse.jgit.transport;
+import static org.eclipse.jgit.lib.Constants.CHARSET;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -93,7 +94,7 @@ public class OpenSshConfigTest extends RepositoryTestCase {
long lastMtime = configFile.lastModified();
do {
try (final OutputStreamWriter fw = new OutputStreamWriter(
- new FileOutputStream(configFile), "UTF-8")) {
+ new FileOutputStream(configFile), CHARSET)) {
fw.write(data);
}
} while (lastMtime == configFile.lastModified());