Skip to content

Commit 8343b6b

Browse files
authored
Merge pull request #2036 from rnveach/unused_exceptions
Removed unused checked exceptions
2 parents 827c537 + 15ca8ba commit 8343b6b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+135
-434
lines changed

pom.xml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -383,16 +383,8 @@
383383
<artifactId>japicmp-maven-plugin</artifactId>
384384
<version>0.23.0</version>
385385
<configuration>
386-
<oldVersion>
387-
<dependency>
388-
<groupId>${project.groupId}</groupId>
389-
<artifactId>${project.artifactId}</artifactId>
390-
<version>2.0.0-alpha-1</version>
391-
<type>jar</type>
392-
</dependency>
393-
</oldVersion>
394386
<parameter>
395-
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications> -->
387+
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
396388
<!-- <breakBuildBasedOnSemanticVersioning>true</breakBuildBasedOnSemanticVersioning> -->
397389
<onlyModified>true</onlyModified>
398390
<includeSynthetic>true</includeSynthetic>

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.kohsuke.github;
22

3-
import java.io.IOException;
43
import java.util.*;
54

65
// TODO: Auto-generated Javadoc
@@ -66,10 +65,8 @@ public GHRepositorySelection getRepositorySelection() {
6665
* Gets expires at.
6766
*
6867
* @return date when this token expires
69-
* @throws IOException
70-
* on error
7168
*/
72-
public Date getExpiresAt() throws IOException {
69+
public Date getExpiresAt() {
7370
return GitHubClient.parseDate(expires_at);
7471
}
7572
}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@ public class GHBranch extends GitHubInteractiveObject {
3434
*
3535
* @param name
3636
* the name
37-
* @throws Exception
38-
* the exception
3937
*/
4038
@JsonCreator
41-
GHBranch(@JsonProperty(value = "name", required = true) String name) throws Exception {
39+
GHBranch(@JsonProperty(value = "name", required = true) String name) {
4240
Objects.requireNonNull(name);
4341
this.name = name;
4442
}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,10 +520,8 @@ public PagedIterable<GHPullRequest> listPullRequests() {
520520
* Retrieves a list of branches where this commit is the head commit.
521521
*
522522
* @return {@link PagedIterable} with the branches where the commit is the head commit
523-
* @throws IOException
524-
* the io exception
525523
*/
526-
public PagedIterable<GHBranch> listBranchesWhereHead() throws IOException {
524+
public PagedIterable<GHBranch> listBranchesWhereHead() {
527525
return owner.root()
528526
.createRequest()
529527
.withUrlPath(String.format("/repos/%s/%s/commits/%s/branches-where-head",

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,9 @@ public GHCommitPointer() {
4949
* This points to the user who owns the {@link #getRepository()}.
5050
*
5151
* @return the user
52-
* @throws IOException
53-
* the io exception
5452
*/
5553
@SuppressFBWarnings(value = { "EI_EXPOSE_REP" }, justification = "Expected behavior")
56-
public GHUser getUser() throws IOException {
54+
public GHUser getUser() {
5755
if (user != null)
5856
return user.root().intern(user);
5957
return user;

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package org.kohsuke.github;
22

3-
import java.io.IOException;
4-
53
// TODO: Auto-generated Javadoc
64
/**
75
* Represents a status of a commit.
@@ -69,10 +67,8 @@ public String getDescription() {
6967
* Gets creator.
7068
*
7169
* @return the creator
72-
* @throws IOException
73-
* the io exception
7470
*/
75-
public GHUser getCreator() throws IOException {
71+
public GHUser getCreator() {
7672
return root().intern(creator);
7773
}
7874

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,8 @@ protected synchronized void populate() throws IOException {
257257
* List immediate children of this directory.
258258
*
259259
* @return the paged iterable
260-
* @throws IOException
261-
* the io exception
262260
*/
263-
public PagedIterable<GHContent> listDirectoryContent() throws IOException {
261+
public PagedIterable<GHContent> listDirectoryContent() {
264262
if (!isDirectory())
265263
throw new IllegalStateException(path + " is not a directory");
266264

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.kohsuke.github;
22

3-
import java.io.IOException;
43
import java.net.URL;
54
import java.util.Collections;
65
import java.util.Map;
@@ -169,10 +168,8 @@ public boolean isProductionEnvironment() {
169168
* Gets creator.
170169
*
171170
* @return the creator
172-
* @throws IOException
173-
* the io exception
174171
*/
175-
public GHUser getCreator() throws IOException {
172+
public GHUser getCreator() {
176173
return root().intern(creator);
177174
}
178175

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@ public GHDiscussion() {
3636
* Gets the html url.
3737
*
3838
* @return the html url
39-
* @throws IOException
40-
* Signals that an I/O exception has occurred.
4139
*/
42-
public URL getHtmlUrl() throws IOException {
40+
public URL getHtmlUrl() {
4341
return GitHubClient.parseURL(htmlUrl);
4442
}
4543

@@ -122,10 +120,8 @@ public boolean isPrivate() {
122120
* @param team
123121
* the team in which the discussion will be created.
124122
* @return a {@link GHLabel.Creator}
125-
* @throws IOException
126-
* the io exception
127123
*/
128-
static GHDiscussion.Creator create(GHTeam team) throws IOException {
124+
static GHDiscussion.Creator create(GHTeam team) {
129125
return new GHDiscussion.Creator(team);
130126
}
131127

@@ -154,10 +150,8 @@ static GHDiscussion read(GHTeam team, long discussionNumber) throws IOException
154150
* @param team
155151
* the team
156152
* @return the paged iterable
157-
* @throws IOException
158-
* Signals that an I/O exception has occurred.
159153
*/
160-
static PagedIterable<GHDiscussion> readAll(GHTeam team) throws IOException {
154+
static PagedIterable<GHDiscussion> readAll(GHTeam team) {
161155
return team.root()
162156
.createRequest()
163157
.setRawUrlPath(getRawUrlPath(team, null))

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,8 @@ public GHUser getActor() throws IOException {
162162
* Gets actor login.
163163
*
164164
* @return the login of the actor.
165-
* @throws IOException
166-
* on error
167165
*/
168-
public String getActorLogin() throws IOException {
166+
public String getActorLogin() {
169167
return actor.getLogin();
170168
}
171169

0 commit comments

Comments
 (0)