[tomcat] branch master updated: SpotBugs - remove unnecessary code

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[tomcat] branch master updated: SpotBugs - remove unnecessary code

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 7554b83  SpotBugs - remove unnecessary code
7554b83 is described below

commit 7554b83d90099eeba40d07984be1e83209375c3a
Author: Mark Thomas <[hidden email]>
AuthorDate: Fri Oct 16 09:44:03 2020 +0100

    SpotBugs - remove unnecessary code
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java b/java/org/apache/catalina/servlets/DefaultServlet.java
index 57a33d0..44032aa 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1306,7 +1306,7 @@ public class DefaultServlet extends HttpServlet {
     private static boolean validate(Ranges.Entry range, long length) {
         long start = getStart(range, length);
         long end = getEnd(range, length);
-        return (range != null) && (start >= 0) && (end >= 0) && (start <= end);
+        return (start >= 0) && (end >= 0) && (start <= end);
     }
 
     private static long getStart(Ranges.Entry range, long length) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]