[ 
https://issues.apache.org/jira/browse/HDDS-12966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Attila Doroszlai updated HDDS-12966:
------------------------------------
        Parent: HDDS-11276
    Issue Type: Sub-task  (was: Bug)

> DBDefinitionFactory should not throw InvalidArnException
> --------------------------------------------------------
>
>                 Key: HDDS-12966
>                 URL: https://issues.apache.org/jira/browse/HDDS-12966
>             Project: Apache Ozone
>          Issue Type: Sub-task
>          Components: Tools
>    Affects Versions: 1.0.0
>            Reporter: Attila Doroszlai
>            Assignee: Ren Koike
>            Priority: Minor
>              Labels: GoodForNewContributors
>
> DBDefinitionFactory should throw built-in exception (IllegalArgumentException 
> or NullPointerException), not some unrelated exception from AWS 
> (InvalidArnException).  Better replace it with {{Objects.requireNonNull}}.
> {code:title=https://github.com/apache/ozone/blob/3201ca4e32b5f23b1ab41e72a3952ce6dac9b118/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/DBDefinitionFactory.java#L77-L80}
>     if (fileName == null) {
>       throw new InvalidArnException(
>           "Path is required to identify the used db scheme");
>     }
> {code}
> Also replace usage of {{Preconditions.checkNotNull}}:
> {code:title=https://github.com/apache/ozone/blob/3201ca4e32b5f23b1ab41e72a3952ce6dac9b118/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/DBDefinitionFactory.java#L74-L75}
>     Preconditions.checkNotNull(dbPath,
>         "Path is required to identify the used db scheme");
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to