From 959f7b822105851056ba3fccc3086e5402d83052 Mon Sep 17 00:00:00 2001 From: Joze RIHTARSIC <joze.RIHTARSIC@ext.ec.europa.eu> Date: Fri, 30 Sep 2022 15:23:08 +0200 Subject: [PATCH] ADD length warning also to domain dialog SML SMP ID and SML Domain --- .../europa/ec/edelivery/smp/services/ServiceGroupService.java | 2 +- .../ServiceGroupServiceSingleDomainIntegrationTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/services/ServiceGroupService.java b/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/services/ServiceGroupService.java index e90bdd75f..8a8bfe61d 100644 --- a/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/services/ServiceGroupService.java +++ b/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/services/ServiceGroupService.java @@ -123,7 +123,7 @@ public class ServiceGroupService { if (!newOwner.isPresent()) { LOG.error("The owner [{}] does not exist! Save service group is rejected!", ownerName); - SMPRuntimeException ex = new SMPRuntimeException(INVALID_OWNER); + SMPRuntimeException ex = new SMPRuntimeException(INVALID_OWNER, ownerName); LOG.businessError(SMPMessageCode.BUS_SAVE_SERVICE_GROUP_FAILED, domain, normalizedParticipantId.getValue(), normalizedParticipantId.getScheme(), ex.getMessage()); throw ex; } diff --git a/smp-server-library/src/test/java/eu/europa/ec/edelivery/smp/services/ServiceGroupServiceSingleDomainIntegrationTest.java b/smp-server-library/src/test/java/eu/europa/ec/edelivery/smp/services/ServiceGroupServiceSingleDomainIntegrationTest.java index 5c61019cf..77a681067 100644 --- a/smp-server-library/src/test/java/eu/europa/ec/edelivery/smp/services/ServiceGroupServiceSingleDomainIntegrationTest.java +++ b/smp-server-library/src/test/java/eu/europa/ec/edelivery/smp/services/ServiceGroupServiceSingleDomainIntegrationTest.java @@ -248,7 +248,7 @@ public class ServiceGroupServiceSingleDomainIntegrationTest extends AbstractServ //then expectedExeption.expect(SMPRuntimeException.class); // get by null domain so: (all registered domains) - expectedExeption.expectMessage(USER_NOT_EXISTS.getMessage()); + expectedExeption.expectMessage(INVALID_OWNER.getMessage(TestConstants.USER_CERT_3)); // when testInstance.saveServiceGroup(inServiceGroup, null, -- GitLab