You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2018/06/06 14:45:42 UTC

svn commit: r1833030 - in /tomcat/trunk/java/org/apache: catalina/ssi/SSIServletExternalResolver.java el/util/ReflectionUtil.java

Author: markt
Date: Wed Jun  6 14:45:42 2018
New Revision: 1833030

URL: http://svn.apache.org/viewvc?rev=1833030&view=rev
Log:
SpotBugs: Remove unreachable code
A little format clean-up

Modified:
    tomcat/trunk/java/org/apache/catalina/ssi/SSIServletExternalResolver.java
    tomcat/trunk/java/org/apache/el/util/ReflectionUtil.java

Modified: tomcat/trunk/java/org/apache/catalina/ssi/SSIServletExternalResolver.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ssi/SSIServletExternalResolver.java?rev=1833030&r1=1833029&r2=1833030&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ssi/SSIServletExternalResolver.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ssi/SSIServletExternalResolver.java Wed Jun  6 14:45:42 2018
@@ -427,13 +427,7 @@ public class SSIServletExternalResolver
         // ie:
         // '/file1.shtml' vs '/appName1/file1.shtml'
         if (!isRootContext(normContext)) {
-            String noContext = getPathWithoutContext(
-                    normContext.getContextPath(), normalized);
-            if (noContext == null) {
-                throw new IOException(
-                        "Couldn't remove context from path: "
-                                + normalized);
-            }
+            String noContext = getPathWithoutContext(normContext.getContextPath(), normalized);
             return new ServletContextAndPath(normContext, noContext);
         }
 

Modified: tomcat/trunk/java/org/apache/el/util/ReflectionUtil.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/util/ReflectionUtil.java?rev=1833030&r1=1833029&r2=1833030&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/el/util/ReflectionUtil.java (original)
+++ tomcat/trunk/java/org/apache/el/util/ReflectionUtil.java Wed Jun  6 14:45:42 2018
@@ -158,12 +158,7 @@ public class ReflectionUtil {
             }
 
             Class<?>[] mParamTypes = m.getParameterTypes();
-            int mParamCount;
-            if (mParamTypes == null) {
-                mParamCount = 0;
-            } else {
-                mParamCount = mParamTypes.length;
-            }
+            int mParamCount = mParamTypes.length;
 
             // Check the number of parameters
             // Multiple tests to improve readability



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