From 433cd20bc7691b140c045ffc94c6b1d9de065a69 Mon Sep 17 00:00:00 2001 From: timartin <tiago.martins.ribeiro@cern.ch> Date: Wed, 7 Mar 2018 13:29:40 +0100 Subject: [PATCH] NXCALS-1564 Added correct key values to error message --- .../nxcals/service/internal/InternalEntityServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/accsoft-nxcals-service/src/main/java/cern/accsoft/nxcals/service/internal/InternalEntityServiceImpl.java b/accsoft-nxcals-service/src/main/java/cern/accsoft/nxcals/service/internal/InternalEntityServiceImpl.java index 752655cc96..c4e8467669 100644 --- a/accsoft-nxcals-service/src/main/java/cern/accsoft/nxcals/service/internal/InternalEntityServiceImpl.java +++ b/accsoft-nxcals-service/src/main/java/cern/accsoft/nxcals/service/internal/InternalEntityServiceImpl.java @@ -289,11 +289,11 @@ public class InternalEntityServiceImpl extends BaseService implements InternalEn private Entity findEntityBySystemIdAndKeyValuesOrThrow(long systemId, Map<String, Object> keyValues) { String entityKeyDefinitions = findSystemOrThrowError(systemId).getEntityKeyDefs(); - return entityRepository.findByPartitionSystemIdAndKeyValues(systemId, - convertMapIntoAvroSchemaString(keyValues, entityKeyDefinitions)) + String stringKeyValues = convertMapIntoAvroSchemaString(keyValues, entityKeyDefinitions); + return entityRepository.findByPartitionSystemIdAndKeyValues(systemId,stringKeyValues) .orElseThrow(() -> new NotFoundRuntimeException( String.format("Entity of system with id %s and key values %s not found.", systemId, - keyValues))); + stringKeyValues))); } private System findSystemOrThrowError(long id) { -- GitLab