slawekjaranowski commented on code in PR #308: URL: https://github.com/apache/maven-resolver/pull/308#discussion_r1358520761
########## maven-resolver-api/src/main/java/org/eclipse/aether/repository/RepositoryPolicy.java: ########## @@ -62,26 +62,40 @@ public final class RepositoryPolicy { private final String updatePolicy; + private final String metadataUpdatePolicy; + private final String checksumPolicy; /** * Creates a new policy with checksum warnings and daily update checks. */ public RepositoryPolicy() { - this(true, UPDATE_POLICY_DAILY, CHECKSUM_POLICY_WARN); + this(true, UPDATE_POLICY_DAILY, UPDATE_POLICY_DAILY, CHECKSUM_POLICY_WARN); + } + + /** + * Creates a new policy with the specified settings (uses same update policy for data and metadata, retains old + * resolver behaviour). + */ + public RepositoryPolicy(boolean enabled, String updatePolicy, String checksumPolicy) { + this(enabled, updatePolicy, updatePolicy, checksumPolicy); } /** * Creates a new policy with the specified settings. * * @param enabled A flag whether the associated repository should be accessed or not. * @param updatePolicy The update interval after which locally cached data from the repository is considered stale - * and should be refetched, may be {@code null}. + * and should be re-fetched, may be {@code null}. + * @param metadataUpdatePolicy The update interval after which locally cached metadata from the repository is considered stale + * and should be re-fetched, may be {@code null}. * @param checksumPolicy The way checksum verification should be handled, may be {@code null}. + * @since TBD */ - public RepositoryPolicy(boolean enabled, String updatePolicy, String checksumPolicy) { + public RepositoryPolicy(boolean enabled, String updatePolicy, String metadataUpdatePolicy, String checksumPolicy) { Review Comment: I don't like many arguments with the same type - String .... it can be anything I would like to consider to use enums for such purpose. We have updatePolicy, metadataUpdatePolicy - it can be the same type eventualy but checksumPolicy - should be another type -- 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