Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Commit adba2e6

Browse files
committed
Renamed for consistency with other methods
1 parent 0ef8b47 commit adba2e6

4 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/main/java/org/kohsuke/github/GHContent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public String getHtmlUrl() {
113113
* Retrieves the actual content stored here.
114114
*/
115115
public InputStream read() throws IOException {
116-
return new Requester(root).read(getDownloadUrl());
116+
return new Requester(root).asStream(getDownloadUrl());
117117
}
118118

119119
/**

src/main/java/org/kohsuke/github/GHRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ public Reader renderMarkdown(String text, MarkdownMode mode) throws IOException
11661166
.with("text", text)
11671167
.with("mode",mode==null?null:mode.toString())
11681168
.with("context", getFullName())
1169-
.read("/markdown"),
1169+
.asStream("/markdown"),
11701170
"UTF-8");
11711171
}
11721172

src/main/java/org/kohsuke/github/GitHub.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ public Reader renderMarkdown(String text) throws IOException {
515515
new Requester(this)
516516
.with(new ByteArrayInputStream(text.getBytes("UTF-8")))
517517
.contentType("text/plain;charset=UTF-8")
518-
.read("/markdown/raw"),
518+
.asStream("/markdown/raw"),
519519
"UTF-8");
520520
}
521521

src/main/java/org/kohsuke/github/Requester.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
*/
2424
package org.kohsuke.github;
2525

26-
import static org.kohsuke.github.GitHub.MAPPER;
26+
import com.fasterxml.jackson.databind.JsonMappingException;
27+
import org.apache.commons.io.IOUtils;
2728

2829
import java.io.FileNotFoundException;
2930
import java.io.IOException;
@@ -46,15 +47,13 @@
4647
import java.util.LinkedHashMap;
4748
import java.util.List;
4849
import java.util.Map;
49-
import java.util.Map.Entry;
5050
import java.util.NoSuchElementException;
5151
import java.util.Set;
5252
import java.util.regex.Matcher;
5353
import java.util.regex.Pattern;
5454
import java.util.zip.GZIPInputStream;
5555

56-
import com.fasterxml.jackson.databind.JsonMappingException;
57-
import org.apache.commons.io.IOUtils;
56+
import static org.kohsuke.github.GitHub.*;
5857

5958
/**
6059
* A builder pattern for making HTTP call and parsing its output.
@@ -265,7 +264,7 @@ public int asHttpStatusCode(String tailApiUrl) throws IOException {
265264
}
266265
}
267266

268-
public InputStream read(String tailApiUrl) throws IOException {
267+
public InputStream asStream(String tailApiUrl) throws IOException {
269268
while (true) {// loop while API rate limit is hit
270269
setupConnection(root.getApiURL(tailApiUrl));
271270

0 commit comments

Comments
 (0)