cstamas commented on code in PR #913: URL: https://github.com/apache/maven/pull/913#discussion_r1080950099
########## maven-core/src/main/java/org/apache/maven/internal/aether/MavenChainedWorkspaceReader.java: ########## @@ -60,6 +62,31 @@ public Model findModel(Artifact artifact) { return null; } + @Override + public Stream<Artifact> listArtifacts() { + return Arrays.stream(readers) + .flatMap(r -> { + // TODO once resolver 2.x is there this part can be simplified + if (r instanceof MavenWorkspaceReader) { + return ((MavenWorkspaceReader) r).listArtifacts(); + } + return Stream.empty(); Review Comment: personally I prefer if-else, reading code similar to this requires more attention IMHO and is easy to slip on it -- 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