Description
Could you please raise WARN in case user defined License family has the same name as internal one?
It seems user defined one is `just ignored` in such caseĀ
Architecture remark
I removed the API module because it consisted of a) class files that were not being used in the code but that were misleading in name; and more importantly b) because there were a number of test cases that would have been converted to Junit5 only to be removed again later.
The harmonization is not necessarily the use of a single API module but rather that the options in each of the UIs should be similarly constructed (same basic phrasing) not have 2 UIs where one says "-enable-default-licenses" (default off) and the other says "-disable-default-licenses" (default on). Also there are options that have been added to one UI that are general in nature (i.e. not part of managing the specific platform the UI is on) and are not available in the other UIs.
I will remove the commented out code. I should have before I submitted this pull request, but skipped it in favor of getting this code change infront of more eyes quickly.
I also have to make a pass to update javadocs.
@jbonofre Most of the changes in this request are the migration to Junit 5. The significant changes are the creation of the classes in the o.a.r..utils directory, the addition of methods to set the associated properties in ReportConfiguration along with the tests for those classes and changes.
The request was to warn on duplication so the solution submitted does the following:
Creates a ReportingSet class that is a SortedSet implementation (wrapping and delegating to a SortedSet). it intercepts the calls to add and addAll to determine if the new elements are already in the set and take an action.
- If logging is enabled (not set to None on the very thing logging wrapper Log) write a message about the collision to the log at the specific level.
- If the internal action (ReportingSet.Option) is set to IGNORE the change is ignored, OVERWRITE the old entry is replaced, FAIL an exception is thrown.
Finally the ReportingSet has an instance variable called duplicateFmt that is a Function<T,String> that produces the information to display in the message.
The change to ReportConfiguration are to use ReportingSet to contain the Licenses and LicenseFamilies, and supporting methods to configure (as noted above).
Attachments
Issue Links
- is caused by
-
RAT-343 Custom licensenses not working in contrast to v0.15
- Closed
- links to