Commit 415e986b authored by Senthil Kumar G S's avatar Senthil Kumar G S Committed by Uze Choi

Fix for JIRA IOT-2044.

Handled "GetStringUTFChars received NULL jstring" error

Change-Id: I67aecab98e496ec715e634246d4ee32efc44aa8b
Signed-off-by: default avatarSenthil Kumar G S <senthil.gs@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18927Reviewed-by: default avatarJihun Ha <jihun.ha@samsung.com>
Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
Tested-by: default avatarUze Choi <uzchoi@samsung.com>
parent 5643df48
...@@ -196,7 +196,9 @@ JNIEXPORT void JNICALL Java_org_iotivity_base_OcRepresentation_setValueStringN ...@@ -196,7 +196,9 @@ JNIEXPORT void JNICALL Java_org_iotivity_base_OcRepresentation_setValueStringN
} }
std::string key = env->GetStringUTFChars(jKey, nullptr); std::string key = env->GetStringUTFChars(jKey, nullptr);
std::string value = env->GetStringUTFChars(jValue, nullptr); std::string value;
if(jValue)
value = env->GetStringUTFChars(jValue, nullptr);
rep->setValue(key, value); rep->setValue(key, value);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment