sahilTakiar 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_r267065622
##########
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:
Yeah, it definitely should be. Fixed.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
|