tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1050684 - /tomcat/trunk/java/org/apache/el/util/Validation.java
Date Sat, 18 Dec 2010 17:44:08 GMT
Author: markt
Date: Sat Dec 18 17:44:07 2010
New Revision: 1050684

URL: http://svn.apache.org/viewvc?rev=1050684&view=rev
Log:
Fix unlikely FindBugs warning

Modified:
    tomcat/trunk/java/org/apache/el/util/Validation.java

Modified: tomcat/trunk/java/org/apache/el/util/Validation.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/util/Validation.java?rev=1050684&r1=1050683&r2=1050684&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/el/util/Validation.java (original)
+++ tomcat/trunk/java/org/apache/el/util/Validation.java Sat Dec 18 17:44:07 2010
@@ -80,7 +80,7 @@ public class Validation {
         int i = 0;
         int j = invalidIdentifiers.length;
         while (i < j) {
-            int k = (i + j) / 2;
+            int k = (i + j) >>> 1; // Avoid overflow
             int result = invalidIdentifiers[k].compareTo(key);
             if (result == 0) {
                 return false;



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


Mime
View raw message