gnodet commented on PR #383: URL: https://github.com/apache/maven-resolver/pull/383#issuecomment-1833775253
@cstamas have you looked at the possibility to add mutators that would return a new `RepositorySession` instance instead of modifying the existing one in-place. This would allow preserving the immutability, as this feels it goes a bit backward... If that does not work, it should be possible to implement a wrapper that would simply delegate to a mutable field. ``` public class DefaultMutableSession implements MutableRepositorySession { private RepositorySession session; public DefaultMutableSession(RepositorySession session) { this.session = session; } public void setCache(RepositoryCache cache) { this.session = session.withCache(cache); } ... } ``` -- 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