trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prashanth-vasudev <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #861: [TRAFODION-1988] Better java exceptio...
Date Wed, 07 Dec 2016 21:55:36 GMT
Github user prashanth-vasudev commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/861#discussion_r91393909
  
    --- Diff: core/sqf/src/seatrans/tm/hbasetmlib2/javaobjectinterfacetm.cpp ---
    @@ -352,12 +349,11 @@ JOI_RetCode JavaObjectInterfaceTM::init(char*           className,
           // Allocate an object of the Java class, and call its constructor.
           // The constructor must be the first entry in the methods array.
           javaObj_ = _tlp_jenv->NewObject(javaClass, JavaMethods[0].methodID);
    -      if (javaObj_ == 0 || _tlp_jenv->ExceptionCheck())
    -      { 
    -        _tlp_jenv->ExceptionDescribe();
    -        _tlp_jenv->ExceptionClear();
    -        _tlp_jenv->DeleteLocalRef(javaClass);  
    -        return JOI_ERROR_NEWOBJ;
    +      if (getExceptionDetails(NULL)) {
    +         tm_log_write(DTM_TM_JNI_ERROR, SQ_LOG_ERR, (char *)"JavaObjectInterfaceTM::init()",

    +             (char *)_tlp_error_msg->c_str(), -1LL);
    +         _tlp_jenv->DeleteLocalRef(javaClass);  
    --- End diff --
    
    Do you need to delete global reference javaclass here?
    Also line 361.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message