Skip to content

Commit

Permalink
Fix cast for error: CHIP_ERROR is not an integer without explicit cast (
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 authored and pull[bot] committed Oct 12, 2023
1 parent e52f4c0 commit 1474293
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controller/java/AndroidCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ void GetConnectedDeviceCallback::OnDeviceConnectionFailureFn(void * context, con
JniClass controllerExceptionJniCls(controllerExceptionCls);

jmethodID exceptionConstructor = env->GetMethodID(controllerExceptionCls, "<init>", "(ILjava/lang/String;)V");
jobject exception = env->NewObject(controllerExceptionCls, exceptionConstructor, error, env->NewStringUTF(ErrorStr(error)));
jobject exception =
env->NewObject(controllerExceptionCls, exceptionConstructor, error.AsInteger(), env->NewStringUTF(ErrorStr(error)));

DeviceLayer::StackUnlock unlock;
env->CallVoidMethod(javaCallback, failureMethod, peerId.GetNodeId(), exception);
Expand Down

0 comments on commit 1474293

Please sign in to comment.