diff --git a/pom.xml b/pom.xml index b9806882..7ea98fb5 100644 --- a/pom.xml +++ b/pom.xml @@ -178,6 +178,12 @@ + + org.jboss.spec.javax.annotation + jboss-annotations-api_1.2_spec + 1.0.0.Final + compile + org.jboss.resteasy resteasy-multipart-provider diff --git a/zanata-rest-client/pom.xml b/zanata-rest-client/pom.xml index 5fc8eb01..d96a042c 100644 --- a/zanata-rest-client/pom.xml +++ b/zanata-rest-client/pom.xml @@ -47,6 +47,10 @@ resteasy-client ${resteasy.version} + + org.jboss.spec.javax.annotation + jboss-annotations-api_1.2_spec + org.jboss.resteasy resteasy-multipart-provider diff --git a/zanata-rest-client/src/main/java/org/zanata/rest/client/GlossaryClient.java b/zanata-rest-client/src/main/java/org/zanata/rest/client/GlossaryClient.java index 10c55c0f..d04d0f67 100644 --- a/zanata-rest-client/src/main/java/org/zanata/rest/client/GlossaryClient.java +++ b/zanata-rest-client/src/main/java/org/zanata/rest/client/GlossaryClient.java @@ -57,7 +57,7 @@ public void post(List glossaryEntries, LocaleId localeId, webResource().path("entries").queryParam("locale", localeId.getId()) .queryParam("qualifiedName", qualifiedName) - .request(MediaType.APPLICATION_JSON_TYPE).post(entity); + .request(MediaType.APPLICATION_JSON_TYPE).post(entity).close(); } public Response downloadFile(String fileType, @@ -76,11 +76,10 @@ public Response downloadFile(String fileType, } public void delete(String id, String qualifiedName) { - Response response = webResource().path("entries/" + id) + webResource().path("entries/" + id) .queryParam("qualifiedName", qualifiedName) .request(MediaType.APPLICATION_JSON_TYPE) - .delete(); - response.close(); + .delete().close(); } public int deleteAll(String qualifiedName) {