[ https://issues.apache.org/jira/browse/DOXIA-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17806454#comment-17806454 ]
ASF GitHub Bot commented on DOXIA-724: -------------------------------------- kwin commented on code in PR #195: URL: https://github.com/apache/maven-doxia/pull/195#discussion_r1451704784 ########## doxia-core/src/main/java/org/apache/maven/doxia/parser/Parser.java: ########## @@ -95,11 +95,12 @@ public interface Parser { void addSinkWrapperFactory(SinkWrapperFactory factory); /** - * - * @return all sink wrapper factories in the correct order (both registered automatically and manually) + * Returns all sink wrapper factories (both registered automatically and manually). The collection is ordered in a way that + * the factories having the lowest priority come first (i.e. in reverse order). + * @return all sink wrapper factories in the reverse order * @since 2.0.0 */ - Collection<SinkWrapperFactory> getSinkWrapperFactories(); + List<SinkWrapperFactory> getSinkWrapperFactories(); Review Comment: I think it was a mistake exposing that via `Parser`. This is clearly SPI only and therefore only belongs to `AbstractParser`. There it should be a protected method. `List` as return value makes sense for usages which try to retrieve the last element only. For me M-builds should allow to modify API. > Sink pipeline returned by AbstractParser.getWrappedSink(...) has wrong order > ---------------------------------------------------------------------------- > > Key: DOXIA-724 > URL: https://issues.apache.org/jira/browse/DOXIA-724 > Project: Maven Doxia > Issue Type: Bug > Affects Versions: 2.0.0-M9 > Reporter: Konrad Windszus > Assignee: Konrad Windszus > Priority: Major > > According to the javadoc the SinkWrapperFactory should be ordered according > to their priority from highest to lowest. However in > {{AbstractParser.getWrappedSink()}} a pipeline is returned which has no > predictable order. -- This message was sent by Atlassian Jira (v8.20.10#820010)