Philipp Ottlinger created RAT-595:
-------------------------------------
Summary: Isolation problem in ReporterTest - NPE on GHA
Key: RAT-595
URL: https://issues.apache.org/jira/browse/RAT-595
Project: Apache RAT
Issue Type: Bug
Affects Versions: 0.18
Reporter: Philipp Ottlinger
h2. Problem
A NPE is thrown in ReporterTest.java (line 201/202) as 2 ways to configure are
mixed:
* collect.parseCommands(...) creates the configuration with its own
BaseOptionCollection
* afterwards the test calls OptionCollection.createConfiguration(context),
which uses a state BASE_OPTION_COLLECTION
OptionCollection.java (line 198-201) selects Arg.DIR albeit the test does not
set a --dir and null is returned instead.
A simple call of the test succeeds as it only happens while running the whole
test suite.
h2. Solution
* Test should use its configuration via context.getConfiguration(); instead of
OptionCollection.createConfiguration(context).
* Add a regression test that ensures setting a --dir does not interfere with a
test without directory set afterwards.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)