tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [tomcat] 05/05: Fix a few SpotBugs issues / align with 8.5.x
Date Wed, 20 Nov 2019 13:25:50 GMT
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

View the commit online:
https://github.com/apache/tomcat/commit/0e3019a82e8ec0a05ce2613f6f3beb9ebda8f78c

commit 0e3019a82e8ec0a05ce2613f6f3beb9ebda8f78c
Author: Mark Thomas <markt@apache.org>
AuthorDate: Wed Nov 20 13:25:25 2019 +0000

    Fix a few SpotBugs issues / align with 8.5.x
---
 .../catalina/authenticator/TesterDigestAuthenticatorPerformance.java    | 2 +-
 test/org/apache/catalina/connector/TestSendFile.java                    | 2 +-
 test/org/apache/catalina/core/TestAsyncContextImpl.java                 | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java
b/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java
index 8ed98dd..7874a6b 100644
--- a/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java
+++ b/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java
@@ -98,7 +98,7 @@ public class TesterDigestAuthenticatorPerformance {
         System.out.println("Average time per request (wall): " +
                 wallTime/(threadCount * requestCount));
 
-        Assert.assertEquals(requestCount * threadCount, totalSuccess);
+        Assert.assertEquals(((long)requestCount) * threadCount, totalSuccess);
     }
 
     @Before
diff --git a/test/org/apache/catalina/connector/TestSendFile.java b/test/org/apache/catalina/connector/TestSendFile.java
index 8607f6f..f525b39 100644
--- a/test/org/apache/catalina/connector/TestSendFile.java
+++ b/test/org/apache/catalina/connector/TestSendFile.java
@@ -80,7 +80,7 @@ public class TestSendFile extends TomcatBaseTest {
                 Assert.assertEquals(HttpServletResponse.SC_OK, rc);
                 System.out.println("Client received " + bc.getLength() + " bytes in "
                         + (System.currentTimeMillis() - start) + " ms.");
-                Assert.assertEquals(EXPECTED_CONTENT_LENGTH * (i + 1), bc.getLength());
+                Assert.assertEquals(EXPECTED_CONTENT_LENGTH * (i + 1L), bc.getLength());
 
                 bc.recycle();
             }
diff --git a/test/org/apache/catalina/core/TestAsyncContextImpl.java b/test/org/apache/catalina/core/TestAsyncContextImpl.java
index 161373f..8afe26f 100644
--- a/test/org/apache/catalina/core/TestAsyncContextImpl.java
+++ b/test/org/apache/catalina/core/TestAsyncContextImpl.java
@@ -1715,7 +1715,7 @@ public class TestAsyncContextImpl extends TomcatBaseTest {
                 REQUEST_TIME);
     }
 
-    private static enum ErrorPageAsyncMode {
+    private enum ErrorPageAsyncMode {
         NO_COMPLETE,
         COMPLETE,
         DISPATCH


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message