[
https://issues.apache.org/jira/browse/HDDS-12966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Attila Doroszlai updated HDDS-12966:
------------------------------------
Affects Version/s: 1.1.0
(was: 1.0.0)
> 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.1.0
> Reporter: Attila Doroszlai
> Assignee: Attila Doroszlai
> Priority: Minor
> Labels: GoodForNewContributors
> Fix For: 2.1.0
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]