Skip to content

Commit 19a1ccd

Browse files
authored
Merge pull request #2042 from rnveach/javadocs
fixed various javadoc issues
2 parents 8343b6b + 9274c8b commit 19a1ccd

16 files changed

+46
-45
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@
2727
* set().otherName(value);
2828
* </pre>
2929
* <p>
30-
* If {@link S} is the same as {@link R}, {@link #with(String, Object)} will commit changes after the first value change
31-
* and return a {@link R} from {@link #done()}.
30+
* If {@code S} is the same as {@code R}, {@link #with(String, Object)} will commit changes after the first value change
31+
* and return a {@code R} from {@link #done()}.
3232
* </p>
3333
* <p>
34-
* If {@link S} is not the same as {@link R}, {@link #with(String, Object)} will batch together multiple changes and let
34+
* If {@code S} is not the same as {@code R}, {@link #with(String, Object)} will batch together multiple changes and let
3535
* the user call {@link #done()} when they are ready.
3636
*
3737
* @author Liam Newman
3838
* @param <R>
3939
* Final return type built by this builder returned when {@link #done()}} is called.
4040
* @param <S>
41-
* Intermediate return type for this builder returned by calls to {@link #with(String, Object)}. If {@link S}
42-
* the same as {@link R}, this builder will commit changes after each call to {@link #with(String, Object)}.
41+
* Intermediate return type for this builder returned by calls to {@link #with(String, Object)}. If {@code S}
42+
* the same as {@code R}, this builder will commit changes after each call to {@link #with(String, Object)}.
4343
*/
4444
abstract class AbstractBuilder<R, S> extends GitHubInteractiveObject implements GitHubRequestBuilderDone<R> {
4545

@@ -68,7 +68,7 @@ abstract class AbstractBuilder<R, S> extends GitHubInteractiveObject implements
6868
* @param finalReturnType
6969
* the final return type for built by this builder returned when {@link #done()}} is called.
7070
* @param intermediateReturnType
71-
* the intermediate return type of type {@link S} returned by calls to {@link #with(String, Object)}.
71+
* the intermediate return type of type {@code S} returned by calls to {@link #with(String, Object)}.
7272
* Must either be equal to {@code builtReturnType} or this instance must be castable to this class. If
7373
* not, the constructor will throw {@link IllegalArgumentException}.
7474
* @param root
@@ -113,10 +113,10 @@ public R done() throws IOException {
113113
/**
114114
* Applies a value to a name for this builder.
115115
*
116-
* If {@link S} is the same as {@link R}, this method will commit changes after the first value change and return a
117-
* {@link R} from {@link #done()}.
116+
* If {@code S} is the same as {@code R}, this method will commit changes after the first value change and return a
117+
* {@code R} from {@link #done()}.
118118
*
119-
* If {@link S} is not the same as {@link R}, this method will return an {@link S} and letting the caller batch
119+
* If {@code S} is not the same as {@code R}, this method will return an {@code S} and letting the caller batch
120120
* together multiple changes and call {@link #done()} when they are ready.
121121
*
122122
* @param name
@@ -137,10 +137,10 @@ protected S with(@Nonnull String name, Object value) throws IOException {
137137
/**
138138
* Chooses whether to return a continuing builder or an updated data record
139139
*
140-
* If {@link S} is the same as {@link R}, this method will commit changes after the first value change and return a
141-
* {@link R} from {@link #done()}.
140+
* If {@code S} is the same as {@code R}, this method will commit changes after the first value change and return a
141+
* {@code R} from {@link #done()}.
142142
*
143-
* If {@link S} is not the same as {@link R}, this method will return an {@link S} and letting the caller batch
143+
* If {@code S} is not the same as {@code R}, this method will return an {@code S} and letting the caller batch
144144
* together multiple changes and call {@link #done()} when they are ready.
145145
*
146146
* @return either a continuing builder or an updated data record

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Base class for creating or updating a discussion.
1111
*
1212
* @param <S>
13-
* Intermediate return type for this builder returned by calls to {@link #with(String, Object)}. If {@link S}
13+
* Intermediate return type for this builder returned by calls to {@link #with(String, Object)}. If {@code S}
1414
* the same as {@link GHLabel}, this builder will commit changes after each call to
1515
* {@link #with(String, Object)}.
1616
*/
@@ -23,7 +23,7 @@ class GHDiscussionBuilder<S> extends AbstractBuilder<GHDiscussion, S> {
2323
*
2424
* @param intermediateReturnType
2525
* Intermediate return type for this builder returned by calls to {@link #with(String, Object)}. If
26-
* {@link S} the same as {@link GHDiscussion}, this builder will commit changes after each call to
26+
* {@code S} the same as {@link GHDiscussion}, this builder will commit changes after each call to
2727
* {@link #with(String, Object)}.
2828
* @param team
2929
* the GitHub team. Updates will be sent to the root of this team.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* The Class GHLabelBuilder.
1111
*
1212
* @param <S>
13-
* Intermediate return type for this builder returned by calls to {@link #with(String, Object)}. If {@link S}
13+
* Intermediate return type for this builder returned by calls to {@link #with(String, Object)}. If {@code S}
1414
* the same as {@link GHLabel}, this builder will commit changes after each call to
1515
* {@link #with(String, Object)}.
1616
*/
@@ -21,7 +21,7 @@ class GHLabelBuilder<S> extends AbstractBuilder<GHLabel, S> {
2121
*
2222
* @param intermediateReturnType
2323
* Intermediate return type for this builder returned by calls to {@link #with(String, Object)}. If
24-
* {@link S} the same as {@link GHLabel}, this builder will commit changes after each call to
24+
* {@code S} the same as {@link GHLabel}, this builder will commit changes after each call to
2525
* {@link #with(String, Object)}.
2626
* @param root
2727
* the GitHub instance to which updates will be sent

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ public static class UnknownLimitRecord extends Record {
326326
* The number of seconds until a {@link UnknownLimitRecord} will expire.
327327
*
328328
* This is set to a somewhat short duration, rather than a long one. This avoids
329-
* {@link {@link GitHubClient#rateLimit(RateLimitTarget)}} requesting rate limit updates continuously, but also
330-
* avoids holding on to stale unknown records indefinitely.
329+
* {@link GitHubClient#rateLimit(RateLimitTarget)} requesting rate limit updates continuously, but also avoids
330+
* holding on to stale unknown records indefinitely.
331331
*
332332
* When merging {@link GHRateLimit} instances, {@link UnknownLimitRecord}s will be superseded by incoming
333333
* regular {@link Record}s.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class GHRepositoryVariableBuilder<S> extends AbstractBuilder<GHRepository
1717
*
1818
* @param intermediateReturnType
1919
* Intermediate return type for this builder returned by calls to {@link #with(String, Object)}. If
20-
* {@link S} the same as {@link GHRepositoryVariable}, this builder will commit changes after each call
20+
* {@code S} the same as {@link GHRepositoryVariable}, this builder will commit changes after each call
2121
* to {@link #with(String, Object)}.
2222
* @param root
2323
* the GitHub instance to which updates will be sent

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ public PagedIterable<GHGist> listGists() {
257257
* @return The LDAP information
258258
* @throws IOException
259259
* the io exception
260-
* @see <a
261-
* href=https://docs.github.com/en/enterprise-server@3.3/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-ldap>Github
260+
* @see <a href=
261+
* "https://docs.github.com/en/enterprise-server@3.3/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-ldap">Github
262262
* LDAP</a>
263263
*/
264264
public Optional<String> getLdapDn() throws IOException {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,8 +684,8 @@ public Map<String, GHOrganization> getMyOrganizations() throws IOException {
684684
* OAuth Apps must authenticate using an OAuth token.
685685
*
686686
* @return the paged iterable of GHMarketplaceUserPurchase
687-
* @see <a href="https://developer.github.com/v3/apps/marketplace/#get-a-users-marketplace-purchases">Get a user's
688-
* Marketplace purchases</a>
687+
* @see <a href="https://developer.github.com/v3/apps/marketplace/#get-a-users-marketplace-purchases">Get a
688+
* user&apos;s Marketplace purchases</a>
689689
*/
690690
public PagedIterable<GHMarketplaceUserPurchase> getMyMarketplacePurchases() {
691691
return createRequest().withUrlPath("/user/marketplace_purchases")

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
* @author Kohsuke Kawaguchi
2121
* @author Liam Newman
22-
* @see GitHubBuilder#withAbuseLimitHandler(AbuseLimitHandler) GitHubBuilder#withRateLimitHandler(AbuseLimitHandler)
22+
* @see GitHubBuilder#withAbuseLimitHandler(GitHubAbuseLimitHandler)
2323
* @see GitHubRateLimitHandler
2424
*/
2525
public abstract class GitHubAbuseLimitHandler extends GitHubConnectorResponseErrorHandler {
@@ -81,7 +81,8 @@ private boolean isForbidden(GitHubConnectorResponse connectorResponse) {
8181
* the response from the GitHub connector
8282
* @return true if either "Retry-After" or "gh-limited-by" headers are present
8383
* @see <a href=
84-
* "https://docs.github.com/en/rest/using-the-rest-api/best-practices-for-using-the-rest-api?apiVersion=2022-11-28#handle-rate-limit-errors-appropriately</a>
84+
* "https://docs.github.com/en/rest/using-the-rest-api/best-practices-for-using-the-rest-api?apiVersion=2022-11-28#handle-rate-limit-errors-appropriately">GitHub
85+
* API Rate Limiting Documentation</a>
8586
*/
8687
private boolean hasRetryOrLimitHeader(GitHubConnectorResponse connectorResponse) {
8788
return hasHeader(connectorResponse, "Retry-After") || hasHeader(connectorResponse, "gh-limited-by");

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,16 +381,16 @@ public String getApiUrl() {
381381

382382
/**
383383
* Builds a {@link GitHubRequest}, sends the {@link GitHubRequest} to the server, and uses the {@link BodyHandler}
384-
* to parse the response info and response body data into an instance of {@link T}.
384+
* to parse the response info and response body data into an instance of {@code T}.
385385
*
386386
* @param <T>
387387
* the type of the parse body data.
388388
* @param builder
389389
* used to build the request that will be sent to the server.
390390
* @param handler
391-
* parse the response info and body data into a instance of {@link T}. If null, no parsing occurs and
391+
* parse the response info and body data into a instance of {@code T}. If null, no parsing occurs and
392392
* {@link GitHubResponse#body()} will return null.
393-
* @return a {@link GitHubResponse} containing the parsed body data as a {@link T}. Parsed instance may be null.
393+
* @return a {@link GitHubResponse} containing the parsed body data as a {@code T}. Parsed instance may be null.
394394
* @throws IOException
395395
* if an I/O Exception occurs
396396
*/
@@ -402,16 +402,16 @@ public <T> GitHubResponse<T> sendRequest(@Nonnull GitHubRequest.Builder<?> build
402402

403403
/**
404404
* Sends the {@link GitHubRequest} to the server, and uses the {@link BodyHandler} to parse the response info and
405-
* response body data into an instance of {@link T}.
405+
* response body data into an instance of {@code T}.
406406
*
407407
* @param <T>
408408
* the type of the parse body data.
409409
* @param request
410410
* the request that will be sent to the server.
411411
* @param handler
412-
* parse the response info and body data into a instance of {@link T}. If null, no parsing occurs and
412+
* parse the response info and body data into a instance of {@code T}. If null, no parsing occurs and
413413
* {@link GitHubResponse#body()} will return null.
414-
* @return a {@link GitHubResponse} containing the parsed body data as a {@link T}. Parsed instance may be null.
414+
* @return a {@link GitHubResponse} containing the parsed body data as a {@code T}. Parsed instance may be null.
415415
* @throws IOException
416416
* if an I/O Exception occurs
417417
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public PagedIterator<T> _iterator(int pageSize) {
5757
}
5858

5959
/**
60-
* Eagerly walk {@link Iterable} and return the result in a {@link GitHubResponse} containing an array of {@link T}
60+
* Eagerly walk {@link Iterable} and return the result in a {@link GitHubResponse} containing an array of {@code T}
6161
* items.
6262
*
6363
* @return the last response with an array containing all the results from all pages.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
// TODO: Auto-generated Javadoc
1111
/**
12-
* May be used for any item that has pagination information. Iterates over paginated {@link T} objects (not the items
13-
* inside the page). Also exposes {@link #finalResponse()} to allow getting a full {@link GitHubResponse<T>} after
14-
* iterating completes.
12+
* May be used for any item that has pagination information. Iterates over paginated {@code T} objects (not the items
13+
* inside the page). Also exposes {@link #finalResponse()} to allow getting a full {@link GitHubResponse}{@code <T>}
14+
* after iterating completes.
1515
*
1616
* Works for array responses, also works for search results which are single instances with an array of items inside.
1717
*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
* @author Kohsuke Kawaguchi
2121
* @author Liam Newman
22-
* @see GitHubBuilder#withRateLimitHandler(RateLimitHandler) GitHubBuilder#withRateLimitHandler(RateLimitHandler)
22+
* @see GitHubBuilder#withRateLimitHandler(GitHubRateLimitHandler)
2323
* @see GitHubAbuseLimitHandler
2424
*/
2525
public abstract class GitHubRateLimitHandler extends GitHubConnectorResponseErrorHandler {

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ class GitHubResponse<T> {
7272
}
7373

7474
/**
75-
* Parses a {@link GitHubConnectorResponse} body into a new instance of {@link T}.
75+
* Parses a {@link GitHubConnectorResponse} body into a new instance of {@code T}.
7676
*
7777
* @param <T>
7878
* the type
7979
* @param connectorResponse
8080
* response info to parse.
8181
* @param type
8282
* the type to be constructed.
83-
* @return a new instance of {@link T}.
83+
* @return a new instance of {@code T}.
8484
* @throws IOException
8585
* if there is an I/O Exception.
8686
*/
@@ -111,15 +111,15 @@ static <T> T parseBody(GitHubConnectorResponse connectorResponse, Class<T> type)
111111
}
112112

113113
/**
114-
* Parses a {@link GitHubConnectorResponse} body into a new instance of {@link T}.
114+
* Parses a {@link GitHubConnectorResponse} body into a new instance of {@code T}.
115115
*
116116
* @param <T>
117117
* the type
118118
* @param connectorResponse
119119
* response info to parse.
120120
* @param instance
121121
* the object to fill with data parsed from body
122-
* @return a new instance of {@link T}.
122+
* @return a new instance of {@code T}.
123123
* @throws IOException
124124
* if there is an I/O Exception.
125125
*/
@@ -207,7 +207,7 @@ public String header(String name) {
207207
}
208208

209209
/**
210-
* The body of the response parsed as a {@link T}.
210+
* The body of the response parsed as a {@code T}.
211211
*
212212
* @return body of the response
213213
*/

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public void send() throws IOException {
7777
* the type parameter
7878
* @param type
7979
* the type
80-
* @return an instance of {@link T}
80+
* @return an instance of {@code T}
8181
* @throws IOException
8282
* if the server returns 4xx/5xx responses.
8383
*/
@@ -152,7 +152,7 @@ public static InputStream copyInputStream(InputStream inputStream) throws IOExce
152152
}
153153

154154
/**
155-
* Creates {@link PagedIterable <R>} from this builder using the provided {@link Consumer<R>}.
155+
* Creates {@link PagedIterable <R>} from this builder using the provided {@link Consumer}{@code <R>}.
156156
* <p>
157157
* This method and the {@link PagedIterable <R>} do not actually begin fetching data until {@link Iterator#next()}
158158
* or {@link Iterator#hasNext()} are called.

src/test/java/org/kohsuke/github/AppTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,7 @@ public void testIssueSearch() {
14131413
/**
14141414
* Test searching for pull requests.
14151415
*
1416-
* @throws IOException
1416+
* @throws Exception
14171417
* the exception
14181418
*/
14191419
@Test

src/test/java/org/kohsuke/github/GHRepositoryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1774,7 +1774,7 @@ public void cannotRetrievePermissionMaintainUser() throws IOException {
17741774
/**
17751775
* Test searching for pull requests.
17761776
*
1777-
* @throws IOException
1777+
* @throws Exception
17781778
* the exception
17791779
*/
17801780
@Test

0 commit comments

Comments
 (0)