From 386742a145a4352c63ef2aa5eaae254e3ce39c39 Mon Sep 17 00:00:00 2001 From: Patrick Huang Date: Tue, 27 Sep 2016 14:07:16 +1000 Subject: [PATCH] ZNTA-1271 - add missing dependency --- pom.xml | 6 ++++++ zanata-rest-client/pom.xml | 4 ++++ .../main/java/org/zanata/rest/client/GlossaryClient.java | 7 +++---- 3 files changed, 13 insertions(+), 4 deletions(-) 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) {