Skip to content

Commit 446f2fa

Browse files
author
lucashimpens
committed
Add string format on LOG.debug
1 parent 8f499e7 commit 446f2fa

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

source/src/main/java/org/cerberus/core/crud/service/impl/TagService.java

+8-9
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ public Answer createAuto(String tagS, String campaign, String user, JSONArray re
318318

319319
@Override
320320
public String enrichTagWithCloudProviderBuild(String provider, String system, String tagS, String user, String pass) {
321-
LOG.debug("Trying to enrish tag '" + tagS + "' with Cloud service provider Build (" + provider + ").");
321+
LOG.debug("Trying to enrish tag '{}' with Cloud service provider Build ({}).", tagS, provider);
322322
if (StringUtil.isEmpty(tagS)) {
323323
return null;
324324
}
@@ -329,10 +329,10 @@ public String enrichTagWithCloudProviderBuild(String provider, String system, St
329329
case TestCaseExecution.ROBOTPROVIDER_BROWSERSTACK:
330330
if ((tag != null) && (StringUtil.isEmpty(tag.getBrowserstackBuildHash()) || "BSHash".equalsIgnoreCase(tag.getBrowserstackBuildHash()))) {
331331
String newBuildHash = browserstackService.getBrowserStackBuildHashFromEndpoint(system, tagS, user, pass, "api.browserstack.com/automate/builds.json");
332-
LOG.debug("Result : " + newBuildHash);
332+
LOG.debug("Result : {}", newBuildHash);
333333
tag.setBrowserstackBuildHash(newBuildHash);
334334
newBuildHash = browserstackService.getBrowserStackBuildHashFromEndpoint(system, tagS, user, pass, "api.browserstack.com/app-automate/builds.json");
335-
LOG.debug("Result : " + newBuildHash);
335+
LOG.debug("Result : {}", newBuildHash);
336336
tag.setBrowserstackAppBuildHash(newBuildHash);
337337
Answer ans = tagDAO.updateBrowserStackBuild(tagS, tag);
338338
return newBuildHash;
@@ -394,13 +394,13 @@ public void manageCampaignEndOfExecution(String tag) throws CerberusException {
394394
AnswerList answerListQueue = new AnswerList<>();
395395
answerListQueue = executionQueueService.readQueueOpen(tag);
396396
if (answerListQueue.isCodeEquals(MessageEventEnum.DATA_OPERATION_OK.getCode()) && (answerListQueue.getDataList().isEmpty())) {
397-
LOG.debug("No More executions (in queue or running) on tag : " + tag + " - " + answerListQueue.getDataList().size() + " " + answerListQueue.getMessageCodeString() + " - ");
397+
LOG.debug("No More executions (in queue or running) on tag : {} - {} {}", tag, answerListQueue.getDataList().size(), answerListQueue.getMessageCodeString());
398398
this.updateEndOfQueueData(tag);
399399
} else {
400-
LOG.debug("Still executions in queue on tag : " + tag + " - " + answerListQueue.getDataList().size() + " " + answerListQueue.getMessageCodeString());
400+
LOG.debug("Still executions in queue on tag : {} - {} {}", tag, answerListQueue.getDataList().size(), answerListQueue.getMessageCodeString());
401401
}
402402
} else {
403-
LOG.debug("Tag is already flaged with recent timestamp. " + currentTag.getDateEndQueue());
403+
LOG.debug("Tag is already flagged with recent timestamp. {}", currentTag.getDateEndQueue());
404404
}
405405

406406
}
@@ -422,7 +422,7 @@ public void manageCampaignStartOfExecution(String tag, Timestamp startOfExecutio
422422
currentTag.setDateStartExe(startOfExecution);
423423
tagDAO.updateDateStartExe(currentTag);
424424
} else {
425-
LOG.debug("Tag is already flaged with recent start of exe timestamp. " + currentTag.getDateStartExe());
425+
LOG.debug("Tag is already flaged with recent start of exe timestamp. {}", currentTag.getDateStartExe());
426426
}
427427

428428
}
@@ -483,8 +483,7 @@ public String formatResult(Tag tag) {
483483
}
484484

485485
JSONObject getJSONEnriched() {
486-
JSONObject result = new JSONObject();
487-
return result;
486+
return new JSONObject();
488487
}
489488

490489
}

0 commit comments

Comments
 (0)