[
https://issues.apache.org/jira/browse/HADOOP-18504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17622792#comment-17622792
]
ASF GitHub Bot commented on HADOOP-18504:
-----------------------------------------
FuzzingTeam commented on code in PR #5064:
URL: https://github.com/apache/hadoop/pull/5064#discussion_r1002701624
##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/crypto/key/TestKeyProvider.java:
##########
@@ -62,6 +62,12 @@ public void testParseVersionName() throws Exception {
} catch (IOException e) {
assertTrue(true);
}
+ try {
Review Comment:
Thank you @steveloughran for the review,
we have used LambdaTestUtils.intercept instead of try.
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyProvider.java:
##########
@@ -639,13 +639,16 @@ public void invalidateCache(String name) throws
IOException {
public abstract void flush() throws IOException;
/**
- * Split the versionName in to a base name. Converts "/aaa/bbb/3" to
+ * Split the versionName in to a base name. Converts "/aaa/bbb@3" to
* "/aaa/bbb".
* @param versionName the version name to split
* @return the base name of the key
* @throws IOException raised on errors performing I/O.
*/
public static String getBaseName(String versionName) throws IOException {
+ if (versionName == null) {
+ throw new IOException("Null string found in key path");
Review Comment:
This has been addressed, please review.
> An unhandled NullPointerException in class KeyProvider
> -------------------------------------------------------
>
> Key: HADOOP-18504
> URL: https://issues.apache.org/jira/browse/HADOOP-18504
> Project: Hadoop Common
> Issue Type: Bug
> Affects Versions: 3.3.4
> Reporter: FuzzingTeam
> Priority: Major
> Labels: pull-request-available
>
> The code throws an unhandled NullPointerException when the method
> *getBaseName* of KeyProvider.java is called with a null as input.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]