From be38a3455e1ec091481225c0551ee1b078041f6f Mon Sep 17 00:00:00 2001 From: Manuel Rego Casasnovas Date: Fri, 8 Feb 2013 10:38:33 +0100 Subject: [PATCH] jira-integration: Change own implementation to strip whitespaces by StringUtils method FEA: ItEr77S16JiraAndTimConnectorContributionIntegration --- .../org/libreplan/importers/JiraRESTClient.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/libreplan-webapp/src/main/java/org/libreplan/importers/JiraRESTClient.java b/libreplan-webapp/src/main/java/org/libreplan/importers/JiraRESTClient.java index 51c5f8033..bcea19b87 100755 --- a/libreplan-webapp/src/main/java/org/libreplan/importers/JiraRESTClient.java +++ b/libreplan-webapp/src/main/java/org/libreplan/importers/JiraRESTClient.java @@ -26,6 +26,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; +import org.apache.commons.lang.StringUtils; import org.apache.cxf.jaxrs.client.WebClient; import org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider; import org.codehaus.jackson.map.DeserializationConfig.Feature; @@ -112,7 +113,8 @@ public class JiraRESTClient { client.query("jql", query); } client.query("maxResults", MAX_RESULTS); - client.query("fields", stripWhiteSpace(FIELDS_TO_INCLUDE_IN_RESPONSE)); + client.query("fields", + StringUtils.deleteWhitespace(FIELDS_TO_INCLUDE_IN_RESPONSE)); SearchResultDTO searchResult = client.get(SearchResultDTO.class); @@ -162,14 +164,4 @@ public class JiraRESTClient { } } - /** - * Strip all white spaces of the specified str - * - * @param str - * the string - * @return string with out white spaces - */ - private static String stripWhiteSpace(String str) { - return str.replaceAll("\\s+", ""); - } }