Skip to content

Commit

Permalink
LPS-26390 Source formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
caorongjin authored and brianchandotcom committed Apr 20, 2012
1 parent 97616ec commit d1c20c0
Showing 1 changed file with 11 additions and 8 deletions.
Expand Up @@ -161,21 +161,26 @@ public String parseResponseContent(

beginIndex += variable.length() + 1;

int endIndex = -1;

if (string) {
beginIndex++;

int endIndex = responseContent.indexOf("\",", beginIndex);
endIndex = responseContent.indexOf("\",", beginIndex);

if (endIndex == -1) {
endIndex = responseContent.length() - 2;
}

return responseContent.substring(beginIndex, endIndex);
}
else {
return responseContent.substring(
beginIndex, responseContent.indexOf(",", beginIndex));
endIndex = responseContent.indexOf(",", beginIndex);

if (endIndex == -1) {
endIndex = responseContent.length() - 1;
}
}

return responseContent.substring(beginIndex, endIndex);
}

private class StringHandler implements ResponseHandler<String> {
Expand All @@ -191,9 +196,7 @@ public String handleResponse(HttpResponse response)
return null;
}

String responseContent = EntityUtils.toString(httpEntity);

return responseContent;
return EntityUtils.toString(httpEntity);
}

protected void checkStatusCode(StatusLine statusLine)
Expand Down

0 comments on commit d1c20c0

Please sign in to comment.