gnodet commented on code in PR #383: URL: https://github.com/apache/maven-resolver/pull/383#discussion_r1414030542
########## maven-resolver-api/src/main/java/org/eclipse/aether/RepositorySystemSession.java: ########## @@ -391,20 +378,20 @@ interface SessionBuilder { SessionBuilder setData(SessionData data); /** - * Sets the custom session data supplier associated with this session. + * Sets the cache the repository system may use to save data for future reuse during the session. * - * @param dataSupplier The session data supplier, may not be {@code null}. + * @param cache The repository cache, may be {@code null} if none. * @return This session for chaining, never {@code null}. */ - SessionBuilder setSessionDataSupplier(Supplier<SessionData> dataSupplier); + SessionBuilder setCache(RepositoryCache cache); /** - * Sets the cache the repository system may use to save data for future reuse during the session. + * Sets the custom session data supplier associated with this session. * - * @param cache The repository cache, may be {@code null} if none. + * @param dataSupplier The session data supplier, may not be {@code null}. * @return This session for chaining, never {@code null}. */ - SessionBuilder setCache(RepositoryCache cache); + SessionBuilder setSessionDataSupplier(Supplier<SessionData> dataSupplier); Review Comment: This is slightly unrelated to this PR, but why do we need a `Supplier<SessionData>` and not directly a `SessionData` ? Same for `setRepositoryCacheSupplier`. I don't think they should be part of the API. If the user wants to set the cache/session data, he will use `setSessionData` or `setRepositoryCache`, and for the default values, we can simply inline the default suppliers when the session is actually built. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org