From 55a17f02cb1a309b48d3daa7859c398128033135 Mon Sep 17 00:00:00 2001 From: liwang <965027894@qq.com> Date: Thu, 28 Aug 2025 16:03:14 +0800 Subject: [PATCH] =?UTF-8?q?sts=5Fcommon.cpp=E6=96=87=E4=BB=B6GetStringArra?= =?UTF-8?q?yByAniObj=E6=96=B9=E6=B3=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liwang <965027894@qq.com> --- frameworks/ets/ani/src/sts_common.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/frameworks/ets/ani/src/sts_common.cpp b/frameworks/ets/ani/src/sts_common.cpp index 77f9cbce6..74ef991a6 100644 --- a/frameworks/ets/ani/src/sts_common.cpp +++ b/frameworks/ets/ani/src/sts_common.cpp @@ -87,20 +87,19 @@ bool GetStringArrayByAniObj(ani_env *env, const ani_object ani_obj, std::vector< ani_int length; ani_status status = env->Object_GetPropertyByName_Int(ani_obj, "length", &length); if (status != ANI_OK) { - ANS_LOGE("Object_GetPropertyByName_Double faild. status %{public}d", status); + ANS_LOGE("Object_GetPropertyByName_Int faild. status %{public}d", status); return false; } for (int32_t i = 0; i < length; i++) { ani_ref stringEntryRef; - status = env->Object_CallMethodByName_Ref(ani_obj, - "$_get", "i:C{std.core.Object}", &stringEntryRef, i); + status = env->Object_CallMethodByName_Ref(ani_obj, "$_get", "i:C{std.core.Object}", &stringEntryRef, i); if (status != ANI_OK) { - ANS_LOGE("status : %{public}d", status); + ANS_LOGE("Object_CallMethodByName_Ref faild. status : %{public}d", status); return false; } std::string std_string; if ((status = GetStringByAniString(env, static_cast(stringEntryRef), std_string)) != ANI_OK) { - ANS_LOGE("GetStdString faild. status %{public}d", status); + ANS_LOGE("GetStringByAniString faild. status %{public}d", status); return false; } stdVString.emplace_back(std_string); -- Gitee