[
https://issues.apache.org/jira/browse/HDFS-3643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13486432#comment-13486432
]
Todd Lipcon commented on HDFS-3643:
-----------------------------------
That's only the case if the return type is a primitive type. If, instead, it
were an array or a class type, then you would see a string there. My "J"
example corresponded to JLONG, but if there were a String it would be
"Ljava/lang/String;". The code here is looking at the first character of the
string to determine which JNI invoke method to use. But if none of the matches,
that's probably because the method signature is malformed, in which case either
returning the entire method signature in the error is appropriate, or returning
at least everything after the ')'.
> hdfsJniHelper.c unchecked string pointers
> -----------------------------------------
>
> Key: HDFS-3643
> URL: https://issues.apache.org/jira/browse/HDFS-3643
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: libhdfs
> Affects Versions: 2.0.0-alpha
> Reporter: Andy Isaacson
> Assignee: Andy Isaacson
> Attachments: hdfs-3643-1.txt, hdfs3643-2.txt, hdfs3643.txt
>
>
> {code}
> str = methSignature;
> while (*str != ')') str++;
> str++;
> returnType = *str;
> {code}
> This loop needs to check for {{'\0'}}. Also the following {{if/else if/else
> if}} cascade doesn't handle unexpected values.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira