From f94fd0106384ed44955630e6f6f530ea1920eead Mon Sep 17 00:00:00 2001 From: "manuele.simi" Date: Fri, 29 Dec 2017 19:21:11 +0000 Subject: [PATCH] Fix javadoc. git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161928 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../resourcemanagement/manager/io/exceptions/CodeFinder.java | 2 +- .../manager/webapp/context/RMContextTest.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/io/src/main/java/org/gcube/resourcemanagement/manager/io/exceptions/CodeFinder.java b/io/src/main/java/org/gcube/resourcemanagement/manager/io/exceptions/CodeFinder.java index e41d34c..ad8aeea 100644 --- a/io/src/main/java/org/gcube/resourcemanagement/manager/io/exceptions/CodeFinder.java +++ b/io/src/main/java/org/gcube/resourcemanagement/manager/io/exceptions/CodeFinder.java @@ -14,7 +14,7 @@ public class CodeFinder { * Finds and convert the given code as enum value. * @param code the code to look for. * @param codes the enum values. - * @return the code as enum value. + * @return the code as enum value or null if the code is not found. */ public static & ErrorCode> E findAndConvert(ErrorCode code, E[] codes) { return Stream.of(codes).filter(e -> e.getId() == code.getId() && e.getMessage().equals(code.getMessage())) diff --git a/webapp/src/test/java/org/gcube/resourcemanagement/manager/webapp/context/RMContextTest.java b/webapp/src/test/java/org/gcube/resourcemanagement/manager/webapp/context/RMContextTest.java index eb4452c..6691c38 100644 --- a/webapp/src/test/java/org/gcube/resourcemanagement/manager/webapp/context/RMContextTest.java +++ b/webapp/src/test/java/org/gcube/resourcemanagement/manager/webapp/context/RMContextTest.java @@ -48,7 +48,7 @@ public class RMContextTest extends JerseyTest { private final static String RR = "http://manuele-registry.dev.d4science.org/resource-registry"; - public static final String DEFAULT_TEST_SCOPE ="71b9ef86-76ba-4346-b16e-9a1af203f6db-98187548"; + public static final String DEFAULT_TEST_SCOPE =""; private static boolean skipTest = false; @@ -114,7 +114,6 @@ public class RMContextTest extends JerseyTest { .post(Entity.entity(ISMapper.marshal(newContext), MediaType.APPLICATION_JSON + ";charset=UTF-8")); SerializableErrorCode code = create.readEntity(SerializableErrorCode.class); - //RMCode realCode = Stream.of(RMCode.values()).filter(e -> e.getId() == code.getId() && e.getMessage().equals(code.getMessage())).findFirst().orElse(null); RMCode realCode = CodeFinder.findAndConvert(code, RMCode.values()); assertNotNull(create); // TODO: to restore an expected success when create is fully