@@ -56,10 +56,10 @@ public class BitbucketBuildStatusNotifier extends Notifier {
56
56
57
57
private static final Logger logger = Logger .getLogger (BitbucketBuildStatusNotifier .class .getName ());
58
58
59
- private boolean notifyStart ;
60
- private boolean notifyFinish ;
61
- private boolean overrideLatestBuild ;
62
- private String credentialsId ;
59
+ private final boolean notifyStart ;
60
+ private final boolean notifyFinish ;
61
+ private final boolean overrideLatestBuild ;
62
+ private final String credentialsId ;
63
63
64
64
@ DataBoundConstructor
65
65
public BitbucketBuildStatusNotifier (final boolean notifyStart , final boolean notifyFinish ,
@@ -99,7 +99,6 @@ private StandardUsernamePasswordCredentials getCredentials(AbstractBuild<?,?> bu
99
99
100
100
@ Override
101
101
public boolean prebuild (AbstractBuild <?, ?> build , BuildListener listener ) {
102
-
103
102
if (!this .notifyStart ) {
104
103
return true ;
105
104
}
@@ -120,7 +119,6 @@ public boolean prebuild(AbstractBuild<?, ?> build, BuildListener listener) {
120
119
121
120
@ Override
122
121
public boolean perform (AbstractBuild <?, ?> build , Launcher launcher , BuildListener listener ) {
123
-
124
122
if (!this .notifyFinish ) {
125
123
return true ;
126
124
}
@@ -160,7 +158,7 @@ public boolean needsToRunAfterFinalized() {
160
158
public static class DescriptorImpl extends BuildStepDescriptor <Publisher > {
161
159
162
160
private String globalCredentialsId ;
163
-
161
+
164
162
public DescriptorImpl () {
165
163
load ();
166
164
}
@@ -240,7 +238,6 @@ public FormValidation doCheckGlobalCredentialsId(@QueryParameter final String gl
240
238
}
241
239
242
240
private FormValidation checkCredentials (UsernamePasswordCredentials credentials ) {
243
-
244
241
try {
245
242
OAuthConfig config = new OAuthConfig (credentials .getUsername (), credentials .getPassword ().getPlainText ());
246
243
BitbucketApiService apiService = (BitbucketApiService ) new BitbucketApi ().createService (config );
0 commit comments