From b2c0afd8d5963232cb3e37ad5ed32d28ea188338 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Thu, 1 Aug 2019 13:23:43 +0100 Subject: [PATCH] Use AlfrescoRuntimeException. --- .../rest/rm/community/requests/gscore/api/RecordFolderAPI.java | 3 ++- .../rm/community/requests/gscore/api/UnfiledContainerAPI.java | 3 ++- .../community/requests/gscore/api/UnfiledRecordFolderAPI.java | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordFolderAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordFolderAPI.java index 640ae1c3ae..42851778e4 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordFolderAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordFolderAPI.java @@ -48,6 +48,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.http.ContentType; +import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.rest.core.RMRestWrapper; import org.alfresco.rest.rm.community.model.record.Record; import org.alfresco.rest.rm.community.model.recordfolder.RecordFolder; @@ -253,7 +254,7 @@ public class RecordFolderAPI extends RMModelRequest } catch (IOException e) { - throw new RuntimeException("Failed to convert model to JSON.", e); + throw new AlfrescoRuntimeException("Failed to convert model to JSON.", e); } // add request fields Iterator fieldNames = root.fieldNames(); diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledContainerAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledContainerAPI.java index 9fe958fbbf..f8b64a78a1 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledContainerAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledContainerAPI.java @@ -47,6 +47,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.http.ContentType; +import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.rest.core.RMRestWrapper; import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainer; import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChild; @@ -216,7 +217,7 @@ public class UnfiledContainerAPI extends RMModelRequest } catch (IOException e) { - throw new RuntimeException("Failed to convert model to JSON.", e); + throw new AlfrescoRuntimeException("Failed to convert model to JSON.", e); } // add request fields Iterator fieldNames = root.fieldNames(); diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledRecordFolderAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledRecordFolderAPI.java index bcb91a40d1..0e23c87290 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledRecordFolderAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledRecordFolderAPI.java @@ -48,6 +48,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.http.ContentType; +import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.rest.core.RMRestWrapper; import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChild; import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChildCollection; @@ -216,7 +217,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest } catch (IOException e) { - throw new RuntimeException("Failed to convert model to JSON.", e); + throw new AlfrescoRuntimeException("Failed to convert model to JSON.", e); } // add request fields Iterator fieldNames = root.fieldNames();