rmannibucau commented on code in PR #913:
URL: https://github.com/apache/maven/pull/913#discussion_r1081859598
##########
maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenWorkspaceReader.java:
##########
@@ -28,4 +29,20 @@
public interface MavenWorkspaceReader extends WorkspaceReader {
Model findModel(Artifact artifact);
+
+ /**
+ * List all available artifacts this workspace repository manages.
+ *
+ * @return a stream of artifacts in no particular order
+ * @since 3.9.0
+ */
+ Stream<Artifact> listArtifacts();
Review Comment:
> It does not, implementors are free to cache items internally
of reactor reader? you want to override it?
About the collection pitfalls, I guess it is mainly about being consistent
with the track on the API and internals we started so I'd say:
1. make it immutable and in the javadoc,
2. solved by 1,
3. solved by 1,
4. solved by 1.
Strictly speaking streams have the exact same pitfall but you move this
issue "when you materialize" the view so this is not really a point except the
fact the view should be immutable as all the work done in the rest of the API
probably.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]