Fix immediate issues for JSON decoding

Fixes #391
Fixes #392
Fixes #398
This commit is contained in:
Admin
2017-01-25 15:19:46 -06:00
parent 881f739c0b
commit c9d55e26ac
9 changed files with 42 additions and 23 deletions

View File

@@ -46,9 +46,10 @@ public class HTTPHome implements Home {
String anUrl = BrightnessDecode.calculateReplaceIntensityValue(anItem.getItem().getAsString(),
intensity, targetBri, targetBriInc, false);
String aBody;
aBody = BrightnessDecode.calculateReplaceIntensityValue(anItem.getHttpBody(),
intensity, targetBri, targetBriInc, false);
String aBody = null;
if(anItem.getHttpBody()!= null && !anItem.getHttpBody().isEmpty())
aBody = BrightnessDecode.calculateReplaceIntensityValue(anItem.getHttpBody(),
intensity, targetBri, targetBriInc, false);
// make call
if (anHttpHandler.doHttpRequest(anUrl, anItem.getHttpVerb(), anItem.getContentType(), aBody,
new Gson().fromJson(anItem.getHttpHeaders(), NameValue[].class)) == null) {