Author: markt
Date: Wed Jun  6 19:14:50 2018
New Revision: 1833072

URL: http://svn.apache.org/viewvc?rev=1833072&view=rev
Log:
SpotBugs: Remove unreachable code
Minor formatting cleanup

Modified:
    tomcat/trunk/java/org/apache/coyote/http2/SendfileData.java
    tomcat/trunk/java/org/apache/tomcat/util/modeler/ManagedBean.java

Modified: tomcat/trunk/java/org/apache/coyote/http2/SendfileData.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/SendfileData.java?rev=1833072&r1=1833071&r2=1833072&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http2/SendfileData.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/SendfileData.java Wed Jun  6 
19:14:50 2018
@@ -25,7 +25,6 @@ class SendfileData {
     // Note: a mapped buffer is a special construct with an underlying file
     // that doesn't need to be closed
     MappedByteBuffer mappedBuffer;
-    int frameSize;
     long left;
     int streamReservation;
     int connectionReservation;

Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/ManagedBean.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/ManagedBean.java?rev=1833072&r1=1833071&r2=1833072&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/ManagedBean.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/ManagedBean.java Wed Jun  
6 19:14:50 2018
@@ -466,18 +466,15 @@ public class ManagedBean implements java
         Method m = null;
 
         AttributeInfo attrInfo = attributes.get(aname);
-        if (attrInfo == null)
+        if (attrInfo == null) {
             throw new AttributeNotFoundException(" Cannot find attribute " + 
aname);
+        }
 
         // Look up the actual operation to be used
         String setMethod = attrInfo.getSetMethod();
-        if (setMethod == null)
-            throw new AttributeNotFoundException("Cannot find attribute " + 
aname + " set method name");
-
         String argType=attrInfo.getType();
 
-        Class<?> signature[] =
-            new Class[] { BaseModelMBean.getAttributeClass( argType ) };
+        Class<?> signature[] = new Class[] { BaseModelMBean.getAttributeClass( 
argType ) };
 
         Object object = null;
         NoSuchMethodException exception = null;
@@ -496,10 +493,10 @@ public class ManagedBean implements java
                 exception = e;
             }
         }
-        if (exception != null)
+        if (exception != null) {
             throw new ReflectionException(exception,
-                                          "Cannot find setter method " + 
setMethod +
-                    " " + resource);
+                    "Cannot find setter method " + setMethod + " " + resource);
+        }
 
         return m;
     }



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

Reply via email to