Skip to content

Commit 9978678

Browse files
authored
Merge pull request #1184 from bitwiseman/no-deprecated
Remove @deprecated annotation from Preview and BetaApi elements
2 parents 66c74e9 + bf9e420 commit 9978678

34 files changed

+4
-157
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ protected AbstractBuilder(@Nonnull Class<R> finalReturnType,
9999
*/
100100
@Nonnull
101101
@BetaApi
102-
@Deprecated
103102
public R done() throws IOException {
104103
R result;
105104
if (updateInPlace && baseInstance != null) {
@@ -129,7 +128,6 @@ public R done() throws IOException {
129128
*/
130129
@Nonnull
131130
@BetaApi
132-
@Deprecated
133131
protected S with(@Nonnull String name, Object value) throws IOException {
134132
requester.with(name, value);
135133
return continueOrDone();
@@ -150,7 +148,6 @@ protected S with(@Nonnull String name, Object value) throws IOException {
150148
*/
151149
@Nonnull
152150
@BetaApi
153-
@Deprecated
154151
protected S continueOrDone() throws IOException {
155152
// This little bit of roughness in this base class means all inheriting builders get to create Updater and
156153
// Setter classes from almost identical code. Creator can often be implemented with significant code reuse as

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ GHApp wrapUp(GitHub root) {
194194
* @see <a href="https://developer.github.com/v3/apps/#list-installations">List installations</a>
195195
*/
196196
@Preview(MACHINE_MAN)
197-
@Deprecated
198197
public PagedIterable<GHAppInstallation> listInstallations() {
199198
return root.createRequest()
200199
.withPreview(MACHINE_MAN)
@@ -215,7 +214,6 @@ public PagedIterable<GHAppInstallation> listInstallations() {
215214
* @see <a href="https://developer.github.com/v3/apps/#get-an-installation">Get an installation</a>
216215
*/
217216
@Preview(MACHINE_MAN)
218-
@Deprecated
219217
public GHAppInstallation getInstallationById(long id) throws IOException {
220218
return root.createRequest()
221219
.withPreview(MACHINE_MAN)
@@ -238,7 +236,6 @@ public GHAppInstallation getInstallationById(long id) throws IOException {
238236
* installation</a>
239237
*/
240238
@Preview(MACHINE_MAN)
241-
@Deprecated
242239
public GHAppInstallation getInstallationByOrganization(String name) throws IOException {
243240
return root.createRequest()
244241
.withPreview(MACHINE_MAN)
@@ -263,7 +260,6 @@ public GHAppInstallation getInstallationByOrganization(String name) throws IOExc
263260
* installation</a>
264261
*/
265262
@Preview(MACHINE_MAN)
266-
@Deprecated
267263
public GHAppInstallation getInstallationByRepository(String ownerName, String repositoryName) throws IOException {
268264
return root.createRequest()
269265
.withPreview(MACHINE_MAN)
@@ -285,7 +281,6 @@ public GHAppInstallation getInstallationByRepository(String ownerName, String re
285281
* @see <a href="https://developer.github.com/v3/apps/#get-a-user-installation">Get a user installation</a>
286282
*/
287283
@Preview(MACHINE_MAN)
288-
@Deprecated
289284
public GHAppInstallation getInstallationByUser(String name) throws IOException {
290285
return root.createRequest()
291286
.withPreview(MACHINE_MAN)

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@ public class GHAppCreateTokenBuilder extends GitHubInteractiveObject {
1919
private final String apiUrlTail;
2020

2121
@BetaApi
22-
@Deprecated
2322
GHAppCreateTokenBuilder(GitHub root, String apiUrlTail) {
2423
this.root = root;
2524
this.apiUrlTail = apiUrlTail;
2625
this.builder = root.createRequest();
2726
}
2827

2928
@BetaApi
30-
@Deprecated
3129
GHAppCreateTokenBuilder(GitHub root, String apiUrlTail, Map<String, GHPermissionType> permissions) {
3230
this(root, apiUrlTail);
3331
permissions(permissions);
@@ -43,7 +41,6 @@ public class GHAppCreateTokenBuilder extends GitHubInteractiveObject {
4341
* @return a GHAppCreateTokenBuilder
4442
*/
4543
@BetaApi
46-
@Deprecated
4744
public GHAppCreateTokenBuilder repositoryIds(List<Long> repositoryIds) {
4845
this.builder.with("repository_ids", repositoryIds);
4946
return this;
@@ -58,7 +55,6 @@ public GHAppCreateTokenBuilder repositoryIds(List<Long> repositoryIds) {
5855
* @return a GHAppCreateTokenBuilder
5956
*/
6057
@BetaApi
61-
@Deprecated
6258
public GHAppCreateTokenBuilder permissions(Map<String, GHPermissionType> permissions) {
6359
Map<String, String> retMap = new HashMap<>();
6460
for (Map.Entry<String, GHPermissionType> entry : permissions.entrySet()) {
@@ -78,7 +74,6 @@ public GHAppCreateTokenBuilder permissions(Map<String, GHPermissionType> permiss
7874
* on error
7975
*/
8076
@Preview(MACHINE_MAN)
81-
@Deprecated
8277
public GHAppInstallationToken create() throws IOException {
8378
return builder.method("POST")
8479
.withPreview(MACHINE_MAN)

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ public String getRepositoriesUrl() {
126126
* @return the paged iterable
127127
*/
128128
@Preview(MACHINE_MAN)
129-
@Deprecated
130129
public PagedSearchIterable<GHRepository> listRepositories() {
131130
GitHubRequest request;
132131

@@ -326,7 +325,6 @@ GHAppInstallation wrapUp(GitHub root) {
326325
* @see <a href="https://developer.github.com/v3/apps/#delete-an-installation">Delete an installation</a>
327326
*/
328327
@Preview(GAMBIT)
329-
@Deprecated
330328
public void deleteInstallation() throws IOException {
331329
root.createRequest()
332330
.method("DELETE")
@@ -348,7 +346,6 @@ public void deleteInstallation() throws IOException {
348346
* @deprecated Use {@link GHAppInstallation#createToken()} instead.
349347
*/
350348
@BetaApi
351-
@Deprecated
352349
public GHAppCreateTokenBuilder createToken(Map<String, GHPermissionType> permissions) {
353350
return new GHAppCreateTokenBuilder(root,
354351
String.format("/app/installations/%d/access_tokens", getId()),
@@ -365,7 +362,6 @@ public GHAppCreateTokenBuilder createToken(Map<String, GHPermissionType> permiss
365362
* @return a GHAppCreateTokenBuilder instance
366363
*/
367364
@BetaApi
368-
@Deprecated
369365
public GHAppCreateTokenBuilder createToken() {
370366
return new GHAppCreateTokenBuilder(root, String.format("/app/installations/%d/access_tokens", getId()));
371367
}

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ public String getName() {
7979
* @return true if the push to this branch is restricted via branch protection.
8080
*/
8181
@Preview(Previews.LUKE_CAGE)
82-
@Deprecated
8382
public boolean isProtected() {
8483
return protection;
8584
}
@@ -90,7 +89,6 @@ public boolean isProtected() {
9089
* @return API URL that deals with the protection of this branch.
9190
*/
9291
@Preview(Previews.LUKE_CAGE)
93-
@Deprecated
9492
public URL getProtectionUrl() {
9593
return GitHubClient.parseURL(protection_url);
9694
}
@@ -103,7 +101,6 @@ public URL getProtectionUrl() {
103101
* the io exception
104102
*/
105103
@Preview(Previews.LUKE_CAGE)
106-
@Deprecated
107104
public GHBranchProtection getProtection() throws IOException {
108105
return root.createRequest()
109106
.withPreview(Previews.LUKE_CAGE)
@@ -138,7 +135,6 @@ public void disableProtection() throws IOException {
138135
* @see GHCommitStatus#getContext() GHCommitStatus#getContext()
139136
*/
140137
@Preview(Previews.LUKE_CAGE)
141-
@Deprecated
142138
public GHBranchProtectionBuilder enableProtection() {
143139
return new GHBranchProtectionBuilder(this);
144140
}

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public class GHBranchProtection extends GitHubInteractiveObject {
4242
* the io exception
4343
*/
4444
@Preview(ZZZAX)
45-
@Deprecated
4645
public void enabledSignedCommits() throws IOException {
4746
requester().method("POST").withUrlPath(url + REQUIRE_SIGNATURES_URI).fetch(RequiredSignatures.class);
4847
}
@@ -54,7 +53,6 @@ public void enabledSignedCommits() throws IOException {
5453
* the io exception
5554
*/
5655
@Preview(ZZZAX)
57-
@Deprecated
5856
public void disableSignedCommits() throws IOException {
5957
requester().method("DELETE").withUrlPath(url + REQUIRE_SIGNATURES_URI).send();
6058
}
@@ -85,7 +83,6 @@ public RequiredReviews getRequiredReviews() {
8583
* the io exception
8684
*/
8785
@Preview(ZZZAX)
88-
@Deprecated
8986
public boolean getRequiredSignatures() throws IOException {
9087
return requester().withUrlPath(url + REQUIRE_SIGNATURES_URI).fetch(RequiredSignatures.class).enabled;
9188
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,6 @@ public static enum AnnotationLevel {
334334
* @return a builder which you should customize, then call {@link GHCheckRunBuilder#create}
335335
*/
336336
@Preview(Previews.ANTIOPE)
337-
@Deprecated
338337
public @NonNull GHCheckRunBuilder update() {
339338
return new GHCheckRunBuilder(owner, getId());
340339
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
*/
4949
@SuppressFBWarnings(value = "URF_UNREAD_FIELD", justification = "Jackson serializes these even without a getter")
5050
@Preview(Previews.ANTIOPE)
51-
@Deprecated
5251
public final class GHCheckRunBuilder {
5352

5453
protected final GHRepository repo;

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,6 @@ private GHUser resolveUser(User author) throws IOException {
454454
* @return {@link PagedIterable} with the pull requests which contain this commit
455455
*/
456456
@Preview(GROOT)
457-
@Deprecated
458457
public PagedIterable<GHPullRequest> listPullRequests() {
459458
return owner.root.createRequest()
460459
.withPreview(GROOT)
@@ -470,7 +469,6 @@ public PagedIterable<GHPullRequest> listPullRequests() {
470469
* the io exception
471470
*/
472471
@Preview(GROOT)
473-
@Deprecated
474472
public PagedIterable<GHBranch> listBranchesWhereHead() throws IOException {
475473
return owner.root.createRequest()
476474
.withPreview(GROOT)
@@ -566,7 +564,6 @@ public GHCommitStatus getLastStatus() throws IOException {
566564
* on error
567565
*/
568566
@Preview(ANTIOPE)
569-
@Deprecated
570567
public PagedIterable<GHCheckRun> getCheckRuns() throws IOException {
571568
return owner.getCheckRuns(sha);
572569
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ public void update(String body) throws IOException {
122122
}
123123

124124
@Preview(SQUIRREL_GIRL)
125-
@Deprecated
126125
public GHReaction createReaction(ReactionContent content) throws IOException {
127126
return owner.root.createRequest()
128127
.method("POST")
@@ -134,7 +133,6 @@ public GHReaction createReaction(ReactionContent content) throws IOException {
134133
}
135134

136135
@Preview(SQUIRREL_GIRL)
137-
@Deprecated
138136
public PagedIterable<GHReaction> listReactions() {
139137
return owner.root.createRequest()
140138
.withPreview(SQUIRREL_GIRL)

0 commit comments

Comments
 (0)