Skip to content

Commit be97c9b

Browse files
author
Mihail Slavchev
committed
bug fix - throw and return empty method list when no implementation object is found
1 parent f0ec666 commit be97c9b

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/jni/com_tns_Platform.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -406,17 +406,10 @@ extern "C" jobjectArray Java_com_tns_Platform_createJSInstanceNative(JNIEnv *_en
406406
if (implementationObject.IsEmpty())
407407
{
408408
NativeScriptRuntime::APP_FAIL("createJSInstanceNative: implementationObject is empty");
409+
return nullptr;
409410
}
410411
DEBUG_WRITE("createJSInstanceNative: implementationObject :%d", implementationObject->GetIdentityHash());
411412

412-
if (implementationObject.IsEmpty())
413-
{
414-
//TODO: support creating js instances after java instances with no implementations defined
415-
//implementationObject = CreateJSProxyInstance(javaObjectID, jstringToString(env, canonicalName));
416-
NativeScriptRuntime::APP_FAIL("createJSInstanceNative: classProxy.implementationObject not found when js instance should be created after java instance");
417-
}
418-
419-
420413
auto node = MetadataNode::GetNodeFromHandle(classProxy);
421414
string name;
422415

0 commit comments

Comments
 (0)