Browse Source

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>
stable-4.2
David Pursehouse 9 years ago
parent
commit
4d3dc41f2f
  1. 5
      org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/ManifestParserTest.java

5
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");

Loading…
Cancel
Save