Emeric Werner created MINDEXER-225:
--------------------------------------
Summary: Indexer-reader handles classNames differently to
JarFileContentsIndexCreator
Key: MINDEXER-225
URL: https://issues.apache.org/jira/browse/MINDEXER-225
Project: Maven Indexer
Issue Type: Bug
Affects Versions: 7.1.3
Reporter: Emeric Werner
The indexer-reader RecordCompactor and RecordExpander classes separate
individual entries of the `classNames` entry using the field separator `|` (see
[https://github.com/apache/maven-indexer/blob/87627e0e797c1b3cc5bb5f007b94b0371b97f7e0/indexer-reader/src/main/java/org/apache/maven/index/reader/RecordExpander.java#L212]
). However, the JarFileContentsIndexCreator class in indexer-core uses
newlines (`\n`) as a separator between classes as seen in
[https://github.com/apache/maven-indexer/blob/87627e0e797c1b3cc5bb5f007b94b0371b97f7e0/indexer-core/src/main/java/org/apache/maven/index/creator/JarFileContentsIndexCreator.java#L166]
. The behaviour of indexer-core with it's JarFileContentsIndexCreator is the
behaviour I am empirically seeing in the wild with sample
nexus-maven-repository-index.gz files.
Of course, one can still pass all the contents in a String whose elements were
joined with the newline character ahead of time - but at that point it makes
little sense why a String array needs to be passed as Record's value as it will
almost always be a String-array of size 1 anyways (on a similar note, the
documentation states that the `classNames` entry stores a value of type
java.util.List<String>, but that is incorrect - it is a String[]).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)