RSS-292: Fixed missing s in string.format

This commit is contained in:
deiflaender 2022-12-09 14:20:50 +01:00
parent b8e92e4d57
commit 51b920644c

View File

@ -183,7 +183,7 @@ public class RSSPoc2Service {
}
if (guidelineDeviationSentences.isEmpty()) {
resultMap.put(DEVIATION_FROM_THE_GUIDELINE_SENTENCE + 1,
SCMComponent.builder().originalValue("").transformation(String.format("Values of type '%' as sentences", "guideline_deviation")).build());
SCMComponent.builder().originalValue("").transformation(String.format("Values of type '%s' as sentences", "guideline_deviation")).build());
}
}
@ -215,7 +215,7 @@ public class RSSPoc2Service {
}
if (sentences.isEmpty()) {
resultMap.put(NECROPSY_FINDINGS_SENTENCE + 1,
SCMComponent.builder().originalValue("").transformation(String.format("Values of type '%' as sentences", "necropsy_findings")).build());
SCMComponent.builder().originalValue("").transformation(String.format("Values of type '%s' as sentences", "necropsy_findings")).build());
}
}
@ -240,7 +240,7 @@ public class RSSPoc2Service {
}
if (weightBehaviorChangesSentences.isEmpty()) {
resultMap.put(WEIGHT_BEHAVIOR_CHANGES_SENTENCE + 1,
SCMComponent.builder().originalValue("").transformation(String.format("Values of type '%' as sentences", "weight_behavior_changes")).build());
SCMComponent.builder().originalValue("").transformation(String.format("Values of type '%s' as sentences", "weight_behavior_changes")).build());
}
resultMap.put(MORTALITY_STATEMENT, getAsOneBlock(redactionLog, "mortality_statement"));
@ -256,7 +256,7 @@ public class RSSPoc2Service {
}
if (sentences.isEmpty()) {
resultMap.put(CLINICAL_OBSERVATIONS_SENTENCE + 1,
SCMComponent.builder().originalValue("").transformation(String.format("Values of type '%' as sentences", "clinical_observations")).build());
SCMComponent.builder().originalValue("").transformation(String.format("Values of type '%s' as sentences", "clinical_observations")).build());
}
sentences = getAsSentences(redactionLog, "bodyweight_changes");
@ -267,7 +267,7 @@ public class RSSPoc2Service {
}
if (sentences.isEmpty()) {
resultMap.put(BODY_WEIGHT_CHANGES_SENTENCE + 1,
SCMComponent.builder().originalValue("").transformation(String.format("Values of type '%' as sentences", "bodyweight_changes")).build());
SCMComponent.builder().originalValue("").transformation(String.format("Values of type '%s' as sentences", "bodyweight_changes")).build());
}
}
@ -290,7 +290,7 @@ public class RSSPoc2Service {
}
if (clinicalSignsSentences.isEmpty()) {
resultMap.put(CLINCAL_SIGNS_SENTENCE + 1,
SCMComponent.builder().originalValue("").transformation(String.format("Values of type '%' as sentences", "clinical_signs")).build());
SCMComponent.builder().originalValue("").transformation(String.format("Values of type '%s' as sentences", "clinical_signs")).build());
}
var doseMortalitySentences = getDoseMortality(redactionLog);
@ -317,7 +317,7 @@ public class RSSPoc2Service {
}
if (sentences.isEmpty()) {
resultMap.put(PRELIMINARY_TEST_RESULTS_SENTENCE + 1,
SCMComponent.builder().originalValue("").transformation(String.format("Values of type '%' as sentences", "preliminary_test_results")).build());
SCMComponent.builder().originalValue("").transformation(String.format("Values of type '%s' as sentences", "preliminary_test_results")).build());
}
resultMap.put(TEST_RESULTS, getAsOneBlock(redactionLog, "test_results"));
@ -680,7 +680,7 @@ public class RSSPoc2Service {
private List<SCMComponent> getAsSentences(RedactionLog redactionLog, String type) {
String transformation = String.format("Values of type '%' as sentences", type);
String transformation = String.format("Values of type '%s' as sentences", type);
List<SCMComponent> sentences = new ArrayList<>();
var typeStringsEntries = redactionLog.getRedactionLogEntry().stream().filter(r -> r.getType().equals(type)).collect(Collectors.toList());