Author: markt
Date: Sat Aug 25 16:38:00 2012
New Revision: 1377321

URL: http://svn.apache.org/viewvc?rev=1377321&view=rev
Log:
Simplify and silence a FindBugs report (Note: there would not have been a 
problem if an increment has been lost)

Modified:
    tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java

Modified: tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java?rev=1377321&r1=1377320&r2=1377321&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java (original)
+++ tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java Sat Aug 25 
16:38:00 2012
@@ -84,7 +84,7 @@ public class JspCompilationContext {
 
     protected final JspRuntimeContext rctxt;
 
-    protected volatile int removed = 0;
+    protected volatile boolean removed = false;
 
     protected URLClassLoader jspLoader;
     protected URL baseUrl;
@@ -592,17 +592,14 @@ public class JspCompilationContext {
     // ==================== Removal ====================
 
     public void incrementRemoved() {
-        if (removed == 0 && rctxt != null) {
+        if (removed == false && rctxt != null) {
             rctxt.removeWrapper(jspUri);
         }
-        removed++;
+        removed = true;
     }
 
     public boolean isRemoved() {
-        if (removed > 0 ) {
-            return true;
-        }
-        return false;
+        return removed;
     }
 
     // ==================== Compile and reload ====================
@@ -656,7 +653,7 @@ public class JspCompilationContext {
             throw new 
JasperException(Localizer.getMessage("jsp.error.unable.compile"),
                                       ex);
         }
-        removed = 0;
+        removed = false;
         return servletClass;
     }
 



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

Reply via email to