mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-10 08:21:21 +00:00
Restored binary compatibility
This commit is contained in:
@@ -7,6 +7,14 @@ public class GHDeploymentStatusBuilder {
|
||||
private GHRepository repo;
|
||||
private long deploymentId;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* ID is long now.
|
||||
*/
|
||||
public GHDeploymentStatusBuilder(GHRepository repo, int deploymentId, GHDeploymentState state) {
|
||||
this(repo,(long)deploymentId,state);
|
||||
}
|
||||
|
||||
public GHDeploymentStatusBuilder(GHRepository repo, long deploymentId, GHDeploymentState state) {
|
||||
this.repo = repo;
|
||||
this.deploymentId = deploymentId;
|
||||
|
||||
@@ -84,14 +84,17 @@ public abstract class GHObject {
|
||||
/**
|
||||
* Unique ID number of this resource.
|
||||
*/
|
||||
@WithBridgeMethods(value=String.class, adapterMethod="longToString")
|
||||
@WithBridgeMethods(value={String.class,int.class}, adapterMethod="longToStringOrInt")
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", justification = "Bridge method of getId")
|
||||
private Object longToString(long id, Class type) {
|
||||
return String.valueOf(id);
|
||||
private Object longToStringOrInt(long id, Class type) {
|
||||
if (type==String.class)
|
||||
return String.valueOf(id);
|
||||
else
|
||||
return (int)id;
|
||||
}
|
||||
|
||||
@SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", justification = "Bridge method of getHtmlUrl")
|
||||
|
||||
@@ -95,6 +95,14 @@ public class GHRepository extends GHObject {
|
||||
return new GHDeploymentBuilder(this,ref);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Use {@link #getDeploymentStatuses(long)}
|
||||
*/
|
||||
public PagedIterable<GHDeploymentStatus> getDeploymentStatuses(final int id) {
|
||||
return getDeploymentStatuses((long)id);
|
||||
}
|
||||
|
||||
public PagedIterable<GHDeploymentStatus> getDeploymentStatuses(final long id) {
|
||||
return new PagedIterable<GHDeploymentStatus>() {
|
||||
public PagedIterator<GHDeploymentStatus> _iterator(int pageSize) {
|
||||
@@ -140,6 +148,14 @@ public class GHRepository extends GHObject {
|
||||
return StringUtils.trimToNull(value)== null? null: name+"="+value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Use {@link #createDeployStatus(long, GHDeploymentState)}
|
||||
*/
|
||||
public GHDeploymentStatusBuilder createDeployStatus(int deploymentId, GHDeploymentState ghDeploymentState) {
|
||||
return createDeployStatus((long)deploymentId,ghDeploymentState);
|
||||
}
|
||||
|
||||
public GHDeploymentStatusBuilder createDeployStatus(long deploymentId, GHDeploymentState ghDeploymentState) {
|
||||
return new GHDeploymentStatusBuilder(this,deploymentId,ghDeploymentState);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user