This is an automated email from the ASF dual-hosted git repository. Claudenw pushed a commit to branch convert-file-arg-to-documentname in repository https://gitbox.apache.org/repos/asf/creadur-rat.git
commit 40d6cd6c631f15bf844409506260cecf64916ddd Author: Claude Warren <[email protected]> AuthorDate: Sun Jul 26 09:03:57 2026 +0100 made FILE argument type return DocumentName --- apache-rat-core/src/main/java/org/apache/rat/ui/UIOption.java | 2 +- .../src/test/java/org/apache/rat/OptionCollectionParserTest.java | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/apache-rat-core/src/main/java/org/apache/rat/ui/UIOption.java b/apache-rat-core/src/main/java/org/apache/rat/ui/UIOption.java index 36f47e93..8fa9cb90 100644 --- a/apache-rat-core/src/main/java/org/apache/rat/ui/UIOption.java +++ b/apache-rat-core/src/main/java/org/apache/rat/ui/UIOption.java @@ -60,7 +60,7 @@ public abstract class UIOption<T extends UIOption<T>> { this.option = option; this.name = name; if (name.isNull()) { - throw new RuntimeException("UIOption name may not be null"); + throw new IllegalArgumentException("UIOption name may not be null"); } OptionCollection.ArgumentType argType; if (option.hasArg()) { diff --git a/apache-rat-core/src/test/java/org/apache/rat/OptionCollectionParserTest.java b/apache-rat-core/src/test/java/org/apache/rat/OptionCollectionParserTest.java index d204cf25..7436c0ed 100644 --- a/apache-rat-core/src/test/java/org/apache/rat/OptionCollectionParserTest.java +++ b/apache-rat-core/src/test/java/org/apache/rat/OptionCollectionParserTest.java @@ -22,7 +22,6 @@ import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; import org.apache.rat.api.RatException; -import org.apache.rat.commandline.Arg; import org.apache.rat.commandline.ArgumentContext; import org.apache.rat.testhelpers.TestingLog; import org.apache.rat.ui.UIOption; @@ -38,8 +37,6 @@ import java.nio.file.Path; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; class OptionCollectionParserTest {
