From f0b4a844736238e19542f56ec9ae9fdcf5463424 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Thu, 18 Jan 2018 21:26:11 +0300 Subject: Delete extractTrigger --- .../plugins/bbprb/BitbucketBuildListener.java | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/org/jenkinsci/plugins/bbprb/BitbucketBuildListener.java b/src/main/java/org/jenkinsci/plugins/bbprb/BitbucketBuildListener.java index 17023b4..2b42ba3 100644 --- a/src/main/java/org/jenkinsci/plugins/bbprb/BitbucketBuildListener.java +++ b/src/main/java/org/jenkinsci/plugins/bbprb/BitbucketBuildListener.java @@ -23,7 +23,8 @@ public class BitbucketBuildListener extends RunListener> { return; } - BitbucketBuildTrigger trigger = extractTrigger(build); + BitbucketBuildTrigger trigger = + build.getProject().getTrigger(BitbucketBuildTrigger.class); if (trigger == null) { return; } @@ -41,7 +42,8 @@ public class BitbucketBuildListener extends RunListener> { @Override public void onCompleted(AbstractBuild build, TaskListener listener) { - BitbucketBuildTrigger trigger = extractTrigger(build); + BitbucketBuildTrigger trigger = + build.getProject().getTrigger(BitbucketBuildTrigger.class); if (trigger != null) { LOGGER.log(Level.FINE, "Completed after BitbucketBuildTrigger"); Result result = build.getResult(); @@ -52,18 +54,6 @@ public class BitbucketBuildListener extends RunListener> { } } - private static BitbucketBuildTrigger - extractTrigger(AbstractBuild build) { - BitbucketBuildTrigger trigger = - build.getProject().getTrigger(BitbucketBuildTrigger.class); - - if (trigger != null) { - return trigger; - } else { - return null; - } - } - private static final Logger LOGGER = Logger.getLogger(BitbucketBuildListener.class.getName()); } -- cgit v1.2.3