Skip to content

Commit 06805c6

Browse files
authored
Fix wrong condition in doCheckCredentialsId that show "Unregistered Server" as validation error message (#1051)
1 parent e8ba718 commit 06805c6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/BitbucketSCMSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ public static FormValidation doCheckServerUrl(@AncestorInPath SCMSourceOwner con
10611061
return FormValidation.error(
10621062
"Unauthorized to validate Server URL"); // not supposed to be seeing this form
10631063
}
1064-
if (BitbucketEndpointConfiguration.get().findEndpoint(value).isPresent()) {
1064+
if (!BitbucketEndpointConfiguration.get().findEndpoint(value).isPresent()) {
10651065
return FormValidation.error("Unregistered Server: " + value);
10661066
}
10671067
return FormValidation.ok();

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/hooks/WebhookAutoRegisterListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ private void removeHooksAsync(final SCMSourceOwner owner) {
116116
public void doRun() {
117117
try {
118118
removeHooks(owner);
119-
} catch (IOException | InterruptedException e) {
119+
} catch (IOException e) {
120120
LOGGER.log(Level.WARNING, "Could not deregister hooks for " + owner.getFullName(), e);
121121
}
122122
}
@@ -185,7 +185,7 @@ private void registerHook(BitbucketSCMSource source) throws IOException {
185185
}
186186
}
187187

188-
private void removeHooks(SCMSourceOwner owner) throws IOException, InterruptedException {
188+
private void removeHooks(SCMSourceOwner owner) throws IOException {
189189
List<BitbucketSCMSource> sources = getBitbucketSCMSources(owner);
190190
for (BitbucketSCMSource source : sources) {
191191
BitbucketApi bitbucket = bitbucketApiFor(source);

0 commit comments

Comments
 (0)