diff --git a/src/controller/java/AndroidOperationalCredentialsIssuer.cpp b/src/controller/java/AndroidOperationalCredentialsIssuer.cpp index f4b57e4ebb2ecd..0efbc4e8da4ed8 100644 --- a/src/controller/java/AndroidOperationalCredentialsIssuer.cpp +++ b/src/controller/java/AndroidOperationalCredentialsIssuer.cpp @@ -501,8 +501,8 @@ CHIP_ERROR N2J_AttestationInfo(JNIEnv * env, jbyteArray challenge, jbyteArray no constructor = env->GetMethodID(infoClass, "", "([B[B[B[B[B[B[B[BII)V"); VerifyOrExit(constructor != nullptr, err = CHIP_JNI_ERROR_METHOD_NOT_FOUND); - outAttestationInfo = (jobject) env->NewObject(infoClass, constructor, challenge, nonce, elements, elementsSignature, dac, pai, - cd, firmwareInfo, static_cast(vendorId), static_cast(productId)); + outAttestationInfo = static_cast(env->NewObject(infoClass, constructor, challenge, nonce, elements, elementsSignature, dac, pai, + cd, firmwareInfo, static_cast(vendorId), static_cast(productId))); VerifyOrExit(!env->ExceptionCheck(), err = CHIP_JNI_ERROR_EXCEPTION_THROWN); exit: