You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2024/07/28 12:12:14 UTC

(maven-site-plugin) branch cruft created (now 7a3ffb5d)

This is an automated email from the ASF dual-hosted git repository.

elharo pushed a change to branch cruft
in repository https://gitbox.apache.org/repos/asf/maven-site-plugin.git


      at 7a3ffb5d Remove debugging strings from test output

This branch includes the following new commits:

     new 7a3ffb5d Remove debugging strings from test output

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(maven-site-plugin) 01/01: Remove debugging strings from test output

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch cruft
in repository https://gitbox.apache.org/repos/asf/maven-site-plugin.git

commit 7a3ffb5d69c780638478f825b1ad9b2dc172364c
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Sun Jul 28 08:12:02 2024 -0400

    Remove debugging strings from test output
---
 .../apache/maven/plugins/site/deploy/AuthAsyncProxyServlet.java   | 8 +-------
 .../apache/maven/plugins/site/deploy/SimpleDavServerHandler.java  | 6 +-----
 2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/src/test/java/org/apache/maven/plugins/site/deploy/AuthAsyncProxyServlet.java b/src/test/java/org/apache/maven/plugins/site/deploy/AuthAsyncProxyServlet.java
index 964fd7ed..c7a40b0e 100644
--- a/src/test/java/org/apache/maven/plugins/site/deploy/AuthAsyncProxyServlet.java
+++ b/src/test/java/org/apache/maven/plugins/site/deploy/AuthAsyncProxyServlet.java
@@ -31,8 +31,6 @@ import java.util.*;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.eclipse.jetty.proxy.AsyncProxyServlet;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * @author Olivier Lamy
@@ -42,8 +40,6 @@ public class AuthAsyncProxyServlet extends AsyncProxyServlet {
 
     private long sleepTime = 0;
 
-    private Logger log = LoggerFactory.getLogger(getClass());
-
     List<HttpRequest> httpRequests = new ArrayList<>();
 
     private File siteTargetPath;
@@ -81,12 +77,11 @@ public class AuthAsyncProxyServlet extends AsyncProxyServlet {
     }
 
     /** {@inheritDoc} */
+    @Override
     public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
         final HttpServletRequest request = (HttpServletRequest) req;
         final HttpServletResponse response = (HttpServletResponse) res;
 
-        log.info("handle ");
-
         if (this.authentications != null && !this.authentications.isEmpty()) {
             String proxyAuthorization = request.getHeader("Proxy-Authorization");
             if (proxyAuthorization != null && proxyAuthorization.startsWith("Basic ")) {
@@ -126,7 +121,6 @@ public class AuthAsyncProxyServlet extends AsyncProxyServlet {
 
                     if (request.getMethod().equalsIgnoreCase("PUT") && targetPath != null) {
                         File targetFile = new File(siteTargetPath, targetPath);
-                        log.info("writing file " + targetFile.getPath());
                         FileUtils.writeByteArrayToFile(targetFile, IOUtils.toByteArray(request.getInputStream()));
                     }
 
diff --git a/src/test/java/org/apache/maven/plugins/site/deploy/SimpleDavServerHandler.java b/src/test/java/org/apache/maven/plugins/site/deploy/SimpleDavServerHandler.java
index 6b251444..0e0b26fb 100644
--- a/src/test/java/org/apache/maven/plugins/site/deploy/SimpleDavServerHandler.java
+++ b/src/test/java/org/apache/maven/plugins/site/deploy/SimpleDavServerHandler.java
@@ -37,8 +37,6 @@ import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.server.handler.AbstractHandler;
 import org.eclipse.jetty.servlet.ServletContextHandler;
 import org.eclipse.jetty.servlet.ServletHolder;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * @author Olivier Lamy
@@ -47,8 +45,6 @@ import org.slf4j.LoggerFactory;
  */
 public class SimpleDavServerHandler {
 
-    private Logger log = LoggerFactory.getLogger(getClass());
-
     private Server server;
 
     private File siteTargetPath;
@@ -58,6 +54,7 @@ public class SimpleDavServerHandler {
     public SimpleDavServerHandler(final File targetPath) throws Exception {
         this.siteTargetPath = targetPath;
         Handler repoHandler = new AbstractHandler() {
+            @Override
             public void handle(String target, Request r, HttpServletRequest request, HttpServletResponse response)
                     throws IOException, ServletException {
                 String targetPath = request.getPathInfo();
@@ -77,7 +74,6 @@ public class SimpleDavServerHandler {
 
                 if (request.getMethod().equalsIgnoreCase("PUT")) {
                     File targetFile = new File(siteTargetPath, targetPath);
-                    log.info("writing file " + targetFile.getPath());
                     FileUtils.writeByteArrayToFile(targetFile, IOUtils.toByteArray(request.getInputStream()));
                 }