From 4d3dc41f2fbc2d9ff33ccfa078e1e63cc1e5c0be Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Mon, 15 Feb 2016 16:52:40 +0900 Subject: [PATCH] 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 --- .../tst/org/eclipse/jgit/gitrepo/ManifestParserTest.java | 5 +++-- 1 file 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 5ed4268eb..30b3df1c0 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");