Author: markt Date: Wed Oct 8 10:20:20 2014 New Revision: 1630060 URL: http://svn.apache.org/r1630060 Log: FindBugs. Use a better test for an odd number. Functionally makes no difference since length is always >=0 but it should be a little faster.
Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/HexUtils.java Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/HexUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/HexUtils.java?rev=1630060&r1=1630059&r2=1630060&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/buf/HexUtils.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/buf/HexUtils.java Wed Oct 8 10:20:20 2014 @@ -97,7 +97,7 @@ public final class HexUtils { return null; } - if (input.length() % 2 == 1) { + if ((input.length() & 1) == 1) { // Odd number of characters throw new IllegalArgumentException(sm.getString("hexUtils.fromHex.oddDigits")); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org