slawekjaranowski commented on code in PR #97:
URL: 
https://github.com/apache/maven-project-info-reports-plugin/pull/97#discussion_r1966507864


##########
src/main/java/org/apache/maven/report/projectinfo/avatars/GravatarProvider.java:
##########
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.report.projectinfo.avatars;
+
+import javax.inject.Named;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Locale;
+
+import org.codehaus.plexus.util.IOUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Provider for user avatar from gravatar.com
+ * <p>
+ * <a href="https://docs.gravatar.com/api/avatars/images/";>Gravatar API</a>
+ */
+@Named("gravatar")
+class GravatarProvider implements AvatarsProvider {
+
+    private static final Logger LOGGER = 
LoggerFactory.getLogger(GravatarProvider.class);
+
+    private static final String AVATAR_SIZE = "s=60";
+
+    private static final String AVATAR_DIRECTORY = "avatars";
+
+    private static final String AVATAR_DEFAULT_FILE_NAME = 
"00000000000000000000000000000000.jpg";

Review Comment:
   I don't know if it default value ... it is used as hash for that we don't 
have an avatar and gravatar return a default image for it.
   
   Also when we use different value which has not avatar connected will be the 
same.



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