[
https://issues.apache.org/jira/browse/HADOOP-18504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17623300#comment-17623300
]
ASF GitHub Bot commented on HADOOP-18504:
-----------------------------------------
steveloughran commented on code in PR #5064:
URL: https://github.com/apache/hadoop/pull/5064#discussion_r1003577628
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyProvider.java:
##########
@@ -646,8 +646,8 @@ public void invalidateCache(String name) throws IOException
{
* @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");
+ if (!Objects.nonNull(versionName)) {
Review Comment:
```
Objects.requireNonNull(versionName, "VersionName cannot be null")
```
> 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]