Fix javadoc.

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161928 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Manuele Simi 2017-12-29 19:21:11 +00:00
parent c1c79bf30d
commit f94fd01063
2 changed files with 2 additions and 3 deletions

View File

@ -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 <E extends Enum<E> & ErrorCode> E findAndConvert(ErrorCode code, E[] codes) {
return Stream.of(codes).filter(e -> e.getId() == code.getId() && e.getMessage().equals(code.getMessage()))

View File

@ -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