diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2016-02-15 16:52:40 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2016-02-15 16:54:50 +0900 |
commit | 4d3dc41f2fbc2d9ff33ccfa078e1e63cc1e5c0be (patch) | |
tree | 0c3d52f1d3d2b6c01a75aa9010067460eac90793 | |
parent | f04bd20fc658365fcf24086ea26beaf3ff5f1ada (diff) | |
download | jgit-4d3dc41f2fbc2d9ff33ccfa078e1e63cc1e5c0be.tar.gz jgit-4d3dc41f2fbc2d9ff33ccfa078e1e63cc1e5c0be.zip |
ManifestParserTest: Don't use deprecated StringBufferInputStream
Replace it with ByteArrayInputStream as suggested in [1].
[1] http://stackoverflow.com/a/2219543/381622
Change-Id: I5ca8d721a756a82ea5f5687a20555303eb1dfc18
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/ManifestParserTest.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/ManifestParserTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/ManifestParserTest.java index 5ed4268eb8..30b3df1c0d 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/ManifestParserTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/ManifestParserTest.java @@ -43,8 +43,9 @@ package org.eclipse.jgit.gitrepo; import static org.junit.Assert.assertTrue; +import static java.nio.charset.StandardCharsets.UTF_8; -import java.io.StringBufferInputStream; +import java.io.ByteArrayInputStream; import java.util.HashSet; import java.util.Set; @@ -77,7 +78,7 @@ public class ManifestParserTest { ManifestParser parser = new ManifestParser( null, null, "master", baseUrl, null, null); - parser.read(new StringBufferInputStream(xmlContent.toString())); + parser.read(new ByteArrayInputStream(xmlContent.toString().getBytes(UTF_8))); // Unfiltered projects should have them all. results.clear(); results.add("foo"); |