From 27fc457decedfdae4a4b86931d3df3274fa285dc Mon Sep 17 00:00:00 2001 From: Tom Page Date: Fri, 10 Mar 2017 12:44:20 +0000 Subject: [PATCH] RM-4339 Fix tests. Also remove catch blocks, since we've upgraded TAS. --- .../org/alfresco/rest/core/RMRestWrapper.java | 33 ++----------------- 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/RMRestWrapper.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/RMRestWrapper.java index d955094c73..e154fc9ea9 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/RMRestWrapper.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/RMRestWrapper.java @@ -83,46 +83,19 @@ public class RMRestWrapper /** Process responses for a collection of models as {@link RestSiteModelsCollection}. */ public T processModels(Class classz, RestRequest simpleRequest) { - try - { - return restWrapper.processModels(classz, simpleRequest); - } - catch (Exception e) - { - // TODO Hopefully remove this check when TAS stops using checked exceptions. - // See https://gitlab.alfresco.com/tas/alfresco-tas-restapi-test/merge_requests/392 - throw new RuntimeException(e); - } + return restWrapper.processModels(classz, simpleRequest); } /** Process responses for a single model as {@link RestSiteModel}. */ public T processModel(Class classz, RestRequest restRequest) { - try - { - return restWrapper.processModel(classz, restRequest); - } - catch (Exception e) - { - // TODO Hopefully remove this check when TAS stops using checked exceptions. - // See https://gitlab.alfresco.com/tas/alfresco-tas-restapi-test/merge_requests/392 - throw new RuntimeException(e); - } + return restWrapper.processModel(classz, restRequest); } /** Process a response that has no body - basically will need only the status code from it. */ public void processEmptyModel(RestRequest simpleRequest) { - try - { - restWrapper.processEmptyModel(simpleRequest); - } - catch (EmptyJsonResponseException e) - { - // TODO Hopefully remove this check when TAS stops using checked exceptions. - // See https://gitlab.alfresco.com/tas/alfresco-tas-restapi-test/merge_requests/392 - throw new RuntimeException(e); - } + restWrapper.processEmptyModel(simpleRequest); } /** Get the most recently returned status code. */