cstamas commented on a change in pull request #139:
URL: https://github.com/apache/maven-resolver/pull/139#discussion_r787557242



##########
File path: 
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/DiscriminatingNameMapper.java
##########
@@ -115,25 +113,22 @@ private String createDiscriminator( final 
RepositorySystemSession session )
             String hostname = ConfigUtils.getString( session, this.hostname, 
CONFIG_PROP_HOSTNAME );
             File basedir = session.getLocalRepository().getBasedir();
             discriminator = hostname + ":" + basedir;
-            try
-            {
-                Map<String, Object> checksums = ChecksumUtils
-                        .calc( discriminator.getBytes( StandardCharsets.UTF_8 
), Collections.singletonList( "SHA-1" ) );
-                Object checksum = checksums.get( "SHA-1" );
-
-                if ( checksum instanceof Exception )
-                {
-                    throw (Exception) checksum;
-                }
-
-                return String.valueOf( checksum );
-            }
-            catch ( Exception e )
-            {
-                LOGGER.warn( "Failed to calculate discriminator digest, using 
'{}'", DEFAULT_DISCRIMINATOR_DIGEST, e );
-                return DEFAULT_DISCRIMINATOR_DIGEST;
-            }
+            return sha1String( discriminator );

Review comment:
       Reset code, left as is, but the as-is code in turn now uses deprecated 
`ChecksumUtils.calc` method...




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


Reply via email to