toddlipcon commented on a change in pull request #600: HDFS-14348: Fix JNI 
exception handling issues in libhdfs
URL: https://github.com/apache/hadoop/pull/600#discussion_r266691858
 
 

 ##########
 File path: 
hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/hdfs.c
 ##########
 @@ -2896,7 +2903,7 @@ hdfsGetHosts(hdfsFS fs, const char *path, tOffset start, 
tOffset length)
     for (i = 0; i < jNumFileBlocks; ++i) {
         jFileBlock =
             (*env)->GetObjectArrayElement(env, jBlockLocations, i);
-        if (!jFileBlock) {
+        if ((*env)->ExceptionOccurred || !jFileBlock) {
 
 Review comment:
   this should be ExceptionOccurred(env), right? it's a function, not a 
variable, isn't it?
   
   (same below a few places)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to