1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Description: Ensures the compatibility with the newer version of httpclient available in Debian.
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: https://github.com/lightcouch/LightCouch/pull/30
--- a/src/main/java/org/lightcouch/CouchDbClientBase.java
+++ b/src/main/java/org/lightcouch/CouchDbClientBase.java
@@ -409,14 +409,9 @@
* @param json The JSON String to set.
*/
protected void setEntity(HttpEntityEnclosingRequestBase httpRequest, String json) {
- try {
- StringEntity entity = new StringEntity(json, "UTF-8");
- entity.setContentType("application/json");
- httpRequest.setEntity(entity);
- } catch (UnsupportedEncodingException e) {
- log.error("Error setting request data. " + e.getMessage());
- throw new IllegalArgumentException(e);
- }
+ StringEntity entity = new StringEntity(json, "UTF-8");
+ entity.setContentType("application/json");
+ httpRequest.setEntity(entity);
}
/**
|