From 3eee219410b25d4af79d596966c5402d9d595091 Mon Sep 17 00:00:00 2001 From: SrdjanStevanetic Date: Mon, 15 Apr 2024 14:07:25 +0200 Subject: [PATCH] sonar cloud fixes --- .../service/etranslation/ETranslationTranslationService.java | 4 ++-- .../api/translation/web/ETranslationCallbackController.java | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/translation-service-etranslation/src/main/java/eu/europeana/api/translation/service/etranslation/ETranslationTranslationService.java b/translation-service-etranslation/src/main/java/eu/europeana/api/translation/service/etranslation/ETranslationTranslationService.java index f4b47adf..bf05c52a 100644 --- a/translation-service-etranslation/src/main/java/eu/europeana/api/translation/service/etranslation/ETranslationTranslationService.java +++ b/translation-service-etranslation/src/main/java/eu/europeana/api/translation/service/etranslation/ETranslationTranslationService.java @@ -66,7 +66,7 @@ public ETranslationTranslationService(String baseUrl, String domain, String call private void validateETranslConfigParams(String baseUrl, String domain, String callbackUrl, int maxWaitMillisec, String username, String password) throws TranslationException { - StringBuilder missingParams=new StringBuilder(100); + StringBuilder missingParams=new StringBuilder(); if(StringUtils.isBlank(baseUrl)) { missingParams.append("baseUrl"); } @@ -186,7 +186,7 @@ private void createRedisMessageListenerAndWaitForResults(List tr * @throws TranslationException */ private String generateJointHtmlForTranslation(List translationObjs) throws TranslationException { - StringBuilder translJointString=new StringBuilder(100); + StringBuilder translJointString=new StringBuilder(); translJointString.append("\n\n\n"); for(TranslationObj translObj : translationObjs) { translJointString.append("

"); diff --git a/translation-web/src/main/java/eu/europeana/api/translation/web/ETranslationCallbackController.java b/translation-web/src/main/java/eu/europeana/api/translation/web/ETranslationCallbackController.java index 89caa2e4..94ba1b6e 100644 --- a/translation-web/src/main/java/eu/europeana/api/translation/web/ETranslationCallbackController.java +++ b/translation-web/src/main/java/eu/europeana/api/translation/web/ETranslationCallbackController.java @@ -32,8 +32,7 @@ public void eTranslationCallback( @RequestParam(value = "external-reference", required = true) String externalReference, @RequestBody String body) { if(LOGGER.isDebugEnabled()) { - LOGGER.debug("eTranslation callback on translation api has been received with the request-id: {}, " - + "and the external-reference: {}", requestId, externalReference); + LOGGER.debug("eTranslation callback on translation api has been received with the external-reference: {}", externalReference); } if(externalReference!=null && body!=null) { redisTemplate.convertAndSend(externalReference, body);