From c6a96d6682f008bf74af361117ff7e338f28a70a Mon Sep 17 00:00:00 2001 From: Madawa Soysa Date: Tue, 25 Jun 2019 16:04:46 +1000 Subject: [PATCH] Fix possible NPE when media type is not specified Content type is automatically generated from the Http client hence removing --- .../java/io/entgra/ui/request/interceptor/InvokerHandler.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/InvokerHandler.java b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/InvokerHandler.java index 8acf32b2f6..0a845ab1a9 100644 --- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/InvokerHandler.java +++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/InvokerHandler.java @@ -205,8 +205,7 @@ public class InvokerHandler extends HttpServlet { entityBuilder.addPart(item.getFieldName(), new InputStreamBody(item.getInputStream(), ContentType.create(item.getContentType()), item.getName())); } else { - entityBuilder.addTextBody(item.getFieldName(), item.getString(), - ContentType.create(item.getContentType())); + entityBuilder.addTextBody(item.getFieldName(), item.getString()); } } proxyRequest.setEntity(entityBuilder.build());