diff --git a/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/client/BitBucketPPRClientCloudVisitor.java b/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/client/BitBucketPPRClientCloudVisitor.java index f3d62f0..2ca54e0 100644 --- a/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/client/BitBucketPPRClientCloudVisitor.java +++ b/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/client/BitBucketPPRClientCloudVisitor.java @@ -60,7 +60,7 @@ public void send(StandardCredentials credentials, Verb verb, String url, String logger.log(Level.FINEST, "Result of the status notification is: {0}, with status code: {1}", new Object[] {responseBody, response.getStatusLine().getStatusCode()}); } catch (IOException e) { - logger.log(Level.WARNING, "Error during state notification: {} ", e.getMessage()); + logger.log(Level.WARNING, "Error during state notification: {0} ", e.getMessage()); } else if (credentials instanceof StringCredentials) { try { @@ -69,7 +69,7 @@ else if (credentials instanceof StringCredentials) { logger.log(Level.FINEST, "Result of the state notification is: {0}, with status code: {1}", new Object[] {response.getBody(), response.getCode()}); } catch (ExecutionException | IOException e) { - logger.log(Level.WARNING, "Error during state notification: {} ", e.getMessage()); + logger.log(Level.WARNING, "Error during state notification: {0} ", e.getMessage()); } catch (InterruptedException e) { throw e; } diff --git a/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/client/BitBucketPPRClientServerVisitor.java b/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/client/BitBucketPPRClientServerVisitor.java index 954846a..fd24c67 100644 --- a/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/client/BitBucketPPRClientServerVisitor.java +++ b/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/client/BitBucketPPRClientServerVisitor.java @@ -63,7 +63,7 @@ public void send(StandardCredentials credentials, Verb verb, String url, String logger.log(Level.FINEST, "Result of the status notification is: {0}, with status code: {1}", new Object[] {responseBody, response.getStatusLine().getStatusCode()}); } catch (IOException e) { - logger.log(Level.WARNING, "Error during state notification: {} ", e.getMessage()); + logger.log(Level.WARNING, "Error during state notification: {0} ", e.getMessage()); } else if (credentials instanceof StringCredentials) try { @@ -73,7 +73,7 @@ else if (credentials instanceof StringCredentials) response.getStatusLine().getStatusCode()}); } catch (ExecutionException | IOException | KeyManagementException | NoSuchAlgorithmException | KeyStoreException e) { - logger.log(Level.WARNING, "Error du" + "ring state notification: {} ", e.getMessage()); + logger.log(Level.WARNING, "Error du" + "ring state notification: {0} ", e.getMessage()); } catch (InterruptedException e) { throw e; } diff --git a/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/common/BitBucketPPRUtils.java b/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/common/BitBucketPPRUtils.java index f662877..646f917 100644 --- a/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/common/BitBucketPPRUtils.java +++ b/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/common/BitBucketPPRUtils.java @@ -89,7 +89,7 @@ public static boolean matchWithRegex(@Nonnull String haystack, @Nonnull String p } if (patternStr == null || patternStr.trim().isEmpty()) { - logger.fine(String.format("The regex filter on the comment from BB is null or it is empty", new Object[] {})); + logger.fine("The regex filter on the comment from BB is null or it is empty"); return true; } diff --git a/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/observer/BitBucketPPRHandlerTemplate.java b/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/observer/BitBucketPPRHandlerTemplate.java index ffdd876..4449132 100644 --- a/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/observer/BitBucketPPRHandlerTemplate.java +++ b/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/observer/BitBucketPPRHandlerTemplate.java @@ -90,7 +90,7 @@ protected void callClient(@Nonnull String url, @Nonnull Map payl String jsonPayload = objectMapper.writeValueAsString(payload); BitBucketPPRClientFactory.createClient(clientType, context).send(url, jsonPayload); } catch (JsonProcessingException e) { - logger.log(Level.WARNING, "Cannot create payload: {}", e.getMessage()); + logger.log(Level.WARNING, "Cannot create payload: {0}", e.getMessage()); } catch (Exception e) { logger.warning(e.getMessage()); } @@ -104,7 +104,7 @@ protected void callClient(@Nonnull Verb verb, @Nonnull String url, String jsonPayload = payload.isEmpty() ? "" : objectMapper.writeValueAsString(payload); BitBucketPPRClientFactory.createClient(clientType, context).send(verb, url, jsonPayload); } catch (JsonProcessingException e) { - logger.log(Level.WARNING, "Cannot create payload: {}", e.getMessage()); + logger.log(Level.WARNING, "Cannot create payload: {0}", e.getMessage()); } catch (Exception e) { logger.warning(e.getMessage()); } diff --git a/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/observer/BitBucketPPRObserverFactory.java b/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/observer/BitBucketPPRObserverFactory.java index cd8981f..6bf6154 100644 --- a/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/observer/BitBucketPPRObserverFactory.java +++ b/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/observer/BitBucketPPRObserverFactory.java @@ -43,28 +43,28 @@ public static BitBucketPPRObservable createObservable( if (REPOSITORY_EVENT.equalsIgnoreCase(bitbucketEvent.getEvent()) && REPOSITORY_CLOUD_PUSH.equalsIgnoreCase(bitbucketEvent.getAction())) { - logger.log(Level.FINE, "Add BitBucketPPRPushCloudObserver for {}", bitbucketEvent); + logger.log(Level.FINE, "Add BitBucketPPRPushCloudObserver for {0}", bitbucketEvent); observable.addObserver(new BitBucketPPRPushCloudObserver()); } if (REPOSITORY_EVENT.equalsIgnoreCase(bitbucketEvent.getEvent()) && REPOSITORY_SERVER_PUSH.equalsIgnoreCase(bitbucketEvent.getAction())) { - logger.log(Level.FINE, "Add BitBucketPPRPushServerObserver for {}", bitbucketEvent); + logger.log(Level.FINE, "Add BitBucketPPRPushServerObserver for {0}", bitbucketEvent); observable.addObserver(new BitBucketPPRPushServerObserver()); } if (PULL_REQUEST_CLOUD_EVENT.equals(bitbucketEvent.getEvent())) { - logger.log(Level.FINE, "Add BitBucketPPRPullRequestCloudObserver for {}", bitbucketEvent); + logger.log(Level.FINE, "Add BitBucketPPRPullRequestCloudObserver for {0}", bitbucketEvent); observable.addObserver(new BitBucketPPRPullRequestCloudObserver()); } if (PULL_REQUEST_SERVER_EVENT.equals(bitbucketEvent.getEvent())) { - logger.log(Level.FINE, "Add BitBucketPPRPullRequestServerObserver for {}", bitbucketEvent); + logger.log(Level.FINE, "Add BitBucketPPRPullRequestServerObserver for {0}", bitbucketEvent); observable.addObserver(new BitBucketPPRPullRequestServerObserver()); } if (observable.getObservers().isEmpty()) - logger.log(Level.FINE, "No observer found for the observable of event {}", bitbucketEvent); + logger.log(Level.FINE, "No observer found for the observable of event {0}", bitbucketEvent); return observable; }