Skip to content

Commit ef291ce

Browse files
authored
CQI Fix placeholder in log messages (#1052)
1 parent 06805c6 commit ef291ce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ public HttpResponse doNotify(StaplerRequest2 req) throws IOException {
137137
return HttpResponses.error(HttpServletResponse.SC_FORBIDDEN, "Payload has not be signed, configure the webHook secret in Bitbucket as documented at https://github.com/jenkinsci/bitbucket-branch-source-plugin/blob/master/docs/USER_GUIDE.adoc#webhooks-registering");
138138
}
139139
} else if (req.getHeader("X-Hub-Signature") == null) {
140-
LOGGER.log(Level.FINER, "Signature not configured for endpoint {}.", endpoint);
140+
LOGGER.log(Level.FINER, "Signature not configured for endpoint {0}.", endpoint);
141141
}
142142
} else {
143-
LOGGER.log(Level.INFO, "No bitbucket endpoint found for {} to verify the signature of incoming webhook.", serverURL);
143+
LOGGER.log(Level.INFO, "No bitbucket endpoint found for {0} to verify the signature of incoming webhook.", serverURL);
144144
}
145145

146146
HookProcessor hookProcessor = getHookProcessor(type);
@@ -150,7 +150,7 @@ public HttpResponse doNotify(StaplerRequest2 req) throws IOException {
150150

151151
@Nullable
152152
private HttpResponseException checkSignature(@NonNull StaplerRequest2 req, @NonNull String body, @NonNull AbstractBitbucketEndpoint endpoint) {
153-
LOGGER.log(Level.FINE, "Payload endpoint host {}, request endpoint host {}", new Object[] { endpoint, req.getRemoteAddr() });
153+
LOGGER.log(Level.FINE, "Payload endpoint host {0}, request endpoint host {1}", new Object[] { endpoint, req.getRemoteAddr() });
154154

155155
StringCredentials signatureCredentials = endpoint.hookSignatureCredentials();
156156
if (signatureCredentials != null) {
@@ -178,7 +178,7 @@ private HttpResponseException checkSignature(@NonNull StaplerRequest2 req, @NonN
178178
String hookId = req.getHeader("X-Hook-UUID");
179179
String requestId = ObjectUtils.firstNonNull(req.getHeader("X-Request-UUID"), req.getHeader("X-Request-Id"));
180180
String hookSignatureCredentialsId = endpoint.getHookSignatureCredentialsId();
181-
LOGGER.log(Level.WARNING, "No credentials {} found to verify the signature of incoming webhook {} request {}", new Object[] { hookSignatureCredentialsId, hookId, requestId });
181+
LOGGER.log(Level.WARNING, "No credentials {0} found to verify the signature of incoming webhook {1} request {2}", new Object[] { hookSignatureCredentialsId, hookId, requestId });
182182
return HttpResponses.error(HttpServletResponse.SC_FORBIDDEN, "No credentials " + hookSignatureCredentialsId + " found to verify the signature");
183183
}
184184
return null;

0 commit comments

Comments
 (0)