/* * Class: org_iotivity_base_OcRepresentation * Method: remove * Signature: (Ljava/lang/String;)Z */ JNIEXPORT jboolean JNICALL Java_org_iotivity_base_OcRepresentation_remove (JNIEnv *env, jobject thiz, jstring jAttributeKey) { LOGD("OcRepresentation_remove"); if (!jAttributeKey) { ThrowOcException(OC_STACK_INVALID_PARAM, "attributeKey cannot be null"); return false; } OCRepresentation *rep = JniOcRepresentation::getOCRepresentationPtr(env, thiz); if (!rep) return false; std::string attributeKey = env->GetStringUTFChars(jAttributeKey, nullptr); return static_cast<jboolean>(rep->erase(attributeKey)); }