Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7735ede

Browse filesBrowse files
author
Arne Burmeister
committed
extend id from int to long
1 parent b443e86 commit 7735ede
Copy full SHA for 7735ede

File tree

Expand file treeCollapse file tree

5 files changed

+10
-10
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+10
-10
lines changed

‎src/main/java/org/kohsuke/github/GHDeploymentStatusBuilder.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHDeploymentStatusBuilder.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
public class GHDeploymentStatusBuilder {
66
private final Requester builder;
77
private GHRepository repo;
8-
private int deploymentId;
8+
private long deploymentId;
99

10-
public GHDeploymentStatusBuilder(GHRepository repo, int deploymentId, GHDeploymentState state) {
10+
public GHDeploymentStatusBuilder(GHRepository repo, long deploymentId, GHDeploymentState state) {
1111
this.repo = repo;
1212
this.deploymentId = deploymentId;
1313
this.builder = new Requester(repo.root);

‎src/main/java/org/kohsuke/github/GHObject.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHObject.java
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public abstract class GHObject {
2525
protected Map<String, List<String>> responseHeaderFields;
2626

2727
protected String url;
28-
protected int id;
28+
protected long id;
2929
protected String created_at;
3030
protected String updated_at;
3131

@@ -84,13 +84,13 @@ public Date getUpdatedAt() throws IOException {
8484
/**
8585
* Unique ID number of this resource.
8686
*/
87-
@WithBridgeMethods(value=String.class, adapterMethod="intToString")
88-
public int getId() {
87+
@WithBridgeMethods(value=String.class, adapterMethod="longToString")
88+
public long getId() {
8989
return id;
9090
}
9191

9292
@SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", justification = "Bridge method of getId")
93-
private Object intToString(int id, Class type) {
93+
private Object longToString(long id, Class type) {
9494
return String.valueOf(id);
9595
}
9696

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHRepository.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public GHDeploymentBuilder createDeployment(String ref) {
9595
return new GHDeploymentBuilder(this,ref);
9696
}
9797

98-
public PagedIterable<GHDeploymentStatus> getDeploymentStatuses(final int id) {
98+
public PagedIterable<GHDeploymentStatus> getDeploymentStatuses(final long id) {
9999
return new PagedIterable<GHDeploymentStatus>() {
100100
public PagedIterator<GHDeploymentStatus> _iterator(int pageSize) {
101101
return new PagedIterator<GHDeploymentStatus>(root.retrieve().asIterator(getApiTailUrl("deployments")+"/"+id+"/statuses", GHDeploymentStatus[].class, pageSize)) {
@@ -140,7 +140,7 @@ private String getParam(String name, String value) {
140140
return StringUtils.trimToNull(value)== null? null: name+"="+value;
141141
}
142142

143-
public GHDeploymentStatusBuilder createDeployStatus(int deploymentId, GHDeploymentState ghDeploymentState) {
143+
public GHDeploymentStatusBuilder createDeployStatus(long deploymentId, GHDeploymentState ghDeploymentState) {
144144
return new GHDeploymentStatusBuilder(this,deploymentId,ghDeploymentState);
145145
}
146146

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GitHub.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ public PagedIterable<GHRepository> listAllPublicRepositories() {
793793
* This provides a dump of every public repository, in the order that they were created.
794794
*
795795
* @param since
796-
* The integer ID of the last Repository that you’ve seen. See {@link GHRepository#getId()}
796+
* The numeric ID of the last Repository that you’ve seen. See {@link GHRepository#getId()}
797797
* @see <a href="https://developer.github.com/v3/repos/#list-all-public-repositories">documentation</a>
798798
*/
799799
public PagedIterable<GHRepository> listAllPublicRepositories(final String since) {

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

Copy file name to clipboardExpand all lines: src/test/java/org/kohsuke/github/AppTest.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ public void testListAllRepositories() throws Exception {
784784
GHRepository r = itr.next();
785785
System.out.println(r.getFullName());
786786
assertNotNull(r.getUrl());
787-
assertNotEquals(0,r.getId());
787+
assertNotEquals(0L,r.getId());
788788
}
789789
}
790790

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.