Skip to content
Permalink
Browse files

[FIXED JENKINS-31884] Since the newest version of onNotifyCommit is c…

…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 1502180512ec9a2b2008d2c13b214b9a25cd5eb5
Showing with 17 additions and 11 deletions.
  1. +17 −11 src/main/java/hudson/plugins/git/GitStatus.java
@@ -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);
}


0 comments on commit 1502180

Please sign in to comment.
You can’t perform that action at this time.