From 36eae205e1d479be7da6f83dda2922e9030b03a5 Mon Sep 17 00:00:00 2001 From: Uts Sikder Date: Wed, 18 Sep 2019 21:29:20 -0700 Subject: [PATCH] fix type mismatches in YogaLogger#log function Summary: This diff fixes two issues with the JNI integration of YogaLogger#log. (1) The YogaLogger class descriptor was missing a semicolon. This causes a ClassNotFoundException whenever you try to call the log method from C++. (2) The C++ signature for the class was using YogaNodeJNIBase as an arg but the Java signature was using YogaNode. This causes a MethodNotFoundException whenever you try to call the method after fixing problem 1. Reviewed By: astreet Differential Revision: D17439957 fbshipit-source-id: be3c16512558050265565b3688fb09a7da31b9b2 --- java/jni/YGJTypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/jni/YGJTypes.h b/java/jni/YGJTypes.h index dfc0901b..0c4bc9a8 100644 --- a/java/jni/YGJTypes.h +++ b/java/jni/YGJTypes.h @@ -26,7 +26,7 @@ struct JYogaLogLevel : public facebook::jni::JavaClass { }; struct JYogaLogger : public facebook::jni::JavaClass { - static constexpr auto kJavaDescriptor = "Lcom/facebook/yoga/YogaLogger"; + static constexpr auto kJavaDescriptor = "Lcom/facebook/yoga/YogaLogger;"; void log( facebook::jni::alias_ref,