yiguolei commented on code in PR #32217:
URL: https://github.com/apache/doris/pull/32217#discussion_r1524158784


##########
be/src/vec/exec/vjdbc_connector.cpp:
##########
@@ -83,8 +83,12 @@ Status JdbcConnector::close(Status /*unused*/) {
     if (_is_in_transaction) {
         RETURN_IF_ERROR(abort_trans());
     }
-    JNIEnv* env;
-    RETURN_IF_ERROR(JniUtil::GetJNIEnv(&env));
+    JNIEnv* env = nullptr;
+    Status status = JniUtil::GetJNIEnv(&env);

Review Comment:
   There are many APIs that call GetJNIEnv, and use 
RETURN_IF_ERROR(JniUtil::GetJNIEnv(&env));
   I think we should add check in GetJNIEnv if the result == nullptr, should 
return an error status.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to