Skip to content

Commit 936ab49

Browse files
committed
Formatting
1 parent 772a6c1 commit 936ab49

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2967,12 +2967,15 @@ public GHTagObject createTag(String tag, String message, String object, String t
29672967
/**
29682968
* Streams a zip archive of the repository, optionally at a given <code>ref</code>.
29692969
*
2970+
* @param <T>
2971+
* the type of result
29702972
* @param streamFunction
29712973
* The {@link InputStreamFunction} that will process the stream
29722974
* @param ref
29732975
* if <code>null</code> the repository's default branch, usually <code>master</code>,
29742976
* @throws IOException
29752977
* The IO exception.
2978+
* @return the result of reading the stream.
29762979
*/
29772980
public <T> T readZip(InputStreamFunction<T> streamFunction, String ref) throws IOException {
29782981
return downloadArchive("zip", ref, streamFunction);
@@ -2981,19 +2984,23 @@ public <T> T readZip(InputStreamFunction<T> streamFunction, String ref) throws I
29812984
/**
29822985
* Streams a tar archive of the repository, optionally at a given <code>ref</code>.
29832986
*
2987+
* @param <T>
2988+
* the type of result
29842989
* @param streamFunction
29852990
* The {@link InputStreamFunction} that will process the stream
29862991
* @param ref
29872992
* if <code>null</code> the repository's default branch, usually <code>master</code>,
29882993
* @throws IOException
29892994
* The IO exception.
2995+
* @return the result of reading the stream.
29902996
*/
29912997
public <T> T readTar(InputStreamFunction<T> streamFunction, String ref) throws IOException {
29922998
return downloadArchive("tar", ref, streamFunction);
29932999
}
29943000

2995-
private <T> T downloadArchive(@Nonnull String type, @CheckForNull String ref, @Nonnull InputStreamFunction<T> streamFunction)
2996-
throws IOException {
3001+
private <T> T downloadArchive(@Nonnull String type,
3002+
@CheckForNull String ref,
3003+
@Nonnull InputStreamFunction<T> streamFunction) throws IOException {
29973004
requireNonNull(streamFunction, "Sink must not be null");
29983005
String tailUrl = getApiTailUrl(type + "ball");
29993006
if (ref != null) {

src/main/java/org/kohsuke/github/function/FunctionThrows.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,24 @@
22

33
/**
44
* A functional interface, equivalent to {@link java.util.function.Function} but that allows throwing {@link Throwable}
5+
*
6+
* @param <T>
7+
* the type of input
8+
* @param <R>
9+
* the type of output
10+
* @param <E>
11+
* the type of error
512
*/
613
@FunctionalInterface
714
public interface FunctionThrows<T, R, E extends Throwable> {
15+
/**
16+
* Apply r.
17+
*
18+
* @param input
19+
* the input
20+
* @return the r
21+
* @throws E
22+
* the e
23+
*/
824
R apply(T input) throws E;
925
}

src/main/java/org/kohsuke/github/function/InputStreamFunction.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
/**
77
* A functional interface, equivalent to {@link java.util.function.Function} but that allows throwing {@link Throwable}
88
*
9+
* @param <R>
10+
* the type to of object to be returned
911
*/
1012
@FunctionalInterface
1113
public interface InputStreamFunction<R> extends FunctionThrows<InputStream, R, IOException> {

0 commit comments

Comments
 (0)