cstamas commented on code in PR #200:
URL: https://github.com/apache/maven-resolver/pull/200#discussion_r990942736


##########
maven-resolver-spi/src/main/java/org/eclipse/aether/spi/checksums/TrustedChecksumsSource.java:
##########
@@ -39,16 +39,44 @@
 public interface TrustedChecksumsSource
 {
     /**
-     * May return the trusted checksums (for given artifact) from trusted 
source, or {@code null}.
+     * May return the trusted checksums (for given artifact) from trusted 
source, or {@code null} if not enabled.
+     * Enabled trusted checksum source SHOULD return non-null (empty map) 
result, when it has no data for given
+     * artifact. Empty map means in this case "no information", but how that 
case is interpreted depends on consumer
+     * for trusted checksums.
      *
      * @param session                    The repository system session, never 
{@code null}.
      * @param artifact                   The artifact we want checksums for, 
never {@code null}.
      * @param artifactRepository         The origin repository: local, 
workspace, remote repository, never {@code null}.
      * @param checksumAlgorithmFactories The checksum algorithms that are 
expected, never {@code null}.
-     * @return Map of expected checksums, or {@code null}.
+     * @return Map of expected checksums, or {@code null} if not enabled.
      */
     Map<String, String> getTrustedArtifactChecksums( RepositorySystemSession 
session,
                                                      Artifact artifact,
                                                      ArtifactRepository 
artifactRepository,
                                                      
List<ChecksumAlgorithmFactory> checksumAlgorithmFactories );
+
+    /**
+     * A writer that is able to write/add trusted checksums to this 
implementation.
+     */
+    interface Writer

Review Comment:
   No, this is a writer interface (I don't like to fully qualifiy names of 
embedded classes/ifaces, as usually IDEs use these as 
`TrustedChecksumsSource.Writer` so is unequivocal what it is about. Is much 
better than `TrustedChecksumsSource.TrustedChecksumsSourceWriter`.



-- 
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]

Reply via email to