Skip to content

Commit

Permalink
[FIXED JENKINS-31884] Since the newest version of onNotifyCommit is c…
Browse files Browse the repository at this point in the history
…alled, newer versions must delegate to older versions that may still have been overridden.
  • Loading branch information
jglick committed Dec 3, 2015
1 parent c87c9b2 commit 1502180
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions src/main/java/hudson/plugins/git/GitStatus.java
Expand Up @@ -165,25 +165,31 @@ public void writeBody(PrintWriter w) {
public static abstract class Listener implements ExtensionPoint {

/**
* Called when there is a change notification on a specific repository url.
*
* @param uri the repository uri.
* @param branches the (optional) branch information.
* @return any response contributors for the response to the push request.
* @since 1.4.1
* @deprecated implement #onNotifyCommit(org.eclipse.jgit.transport.URIish, String, String...)
* @deprecated implement {@link #onNotifyCommit(org.eclipse.jgit.transport.URIish, String, List, String...)}
*/
public List<ResponseContributor> onNotifyCommit(URIish uri, String[] branches) {
return onNotifyCommit(uri, null, branches);
throw new AbstractMethodError();
}

/**
* @deprecated implement {@link #onNotifyCommit(org.eclipse.jgit.transport.URIish, String, List, String...)}
*/
public List<ResponseContributor> onNotifyCommit(URIish uri, @Nullable String sha1, String... branches) {
List<ParameterValue> buildParameters = Collections.EMPTY_LIST;
return onNotifyCommit(uri, sha1, buildParameters, branches);
return onNotifyCommit(uri, branches);
}

/**
* Called when there is a change notification on a specific repository url.
*
* @param uri the repository uri.
* @param sha1 ?
* @param buildParameters ?
* @param branches the (optional) branch information.
* @return any response contributors for the response to the push request.
* @since 2.4.0
*/
public List<ResponseContributor> onNotifyCommit(URIish uri, @Nullable String sha1, List<ParameterValue> buildParameters, String... branches) {
return Collections.EMPTY_LIST;
return onNotifyCommit(uri, sha1, branches);
}


Expand Down

0 comments on commit 1502180

Please sign in to comment.