private void uploadContents(HttpConnection api,
Map<String, LfsPointer> oid2ptr) throws IOException {
try (JsonReader reader = new JsonReader(
- new InputStreamReader(api.getInputStream()))) {
+ new InputStreamReader(api.getInputStream(), CHARSET))) {
for (Protocol.ObjectInfo o : parseObjects(reader)) {
if (o.actions == null) {
continue;
Integer.valueOf(responseCode)));
}
try (JsonReader reader = new JsonReader(
- new InputStreamReader(lfsServerConn.getInputStream()))) {
+ new InputStreamReader(lfsServerConn.getInputStream(),
+ CHARSET))) {
Protocol.Response resp = gson.fromJson(reader,
Protocol.Response.class);
for (Protocol.ObjectInfo o : resp.objects) {
private String readStream(InputStream stream) throws IOException {
try (BufferedReader in = new BufferedReader(
- new InputStreamReader(stream))) {
+ new InputStreamReader(stream, CHARSET))) {
StringBuilder out = new StringBuilder();
String line;
while ((line = in.readLine()) != null) {
*/
package org.eclipse.jgit.merge;
+import static org.eclipse.jgit.lib.Constants.CHARSET;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
StringBuilder result = new StringBuilder();
ObjectReader or = r.newObjectReader();
try (BufferedReader br = new BufferedReader(
- new InputStreamReader(or.open(blobId).openStream()))) {
+ new InputStreamReader(or.open(blobId).openStream(), CHARSET))) {
String line;
boolean first = true;
while ((line = br.readLine()) != null) {
c.setConnectTimeout(500);
c.setReadTimeout(500);
try (BufferedReader reader = new BufferedReader(
- new InputStreamReader(c.getInputStream()))) {
+ new InputStreamReader(c.getInputStream(), CHARSET))) {
return reader.readLine();
}
} catch (UnknownHostException | SocketTimeoutException e) {