aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2018-01-18 21:26:11 +0300
committerIgor Pashev <pashev.igor@gmail.com>2018-01-18 21:26:11 +0300
commitf0b4a844736238e19542f56ec9ae9fdcf5463424 (patch)
tree6a502fc92802acee2b8800e6968d92013721b3ac /src/main/java
parent6994abc807bf53c335c7c61669ab12832c55d05e (diff)
downloadbbprb-f0b4a844736238e19542f56ec9ae9fdcf5463424.tar.gz
Delete extractTrigger
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/jenkinsci/plugins/bbprb/BitbucketBuildListener.java18
1 files changed, 4 insertions, 14 deletions
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<AbstractBuild<?, ?>> {
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<AbstractBuild<?, ?>> {
@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<AbstractBuild<?, ?>> {
}
}
- 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());
}