commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1364286 - /commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/itu_t4/T4AndT6Compression.java
Date Sun, 22 Jul 2012 13:06:17 GMT
Author: damjan
Date: Sun Jul 22 13:06:16 2012
New Revision: 1364286

URL: http://svn.apache.org/viewvc?rev=1364286&view=rev
Log:
Method lowerBound in org.apache.commons.imaging.common.itu_t4.T4AndT6Compression has a division
error.

Jira issue key: IMAGING-88
Submitted by: Craig Kelly <craig dot n dot kelly at gmail dot com>


Modified:
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/itu_t4/T4AndT6Compression.java

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/itu_t4/T4AndT6Compression.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/itu_t4/T4AndT6Compression.java?rev=1364286&r1=1364285&r2=1364286&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/itu_t4/T4AndT6Compression.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/itu_t4/T4AndT6Compression.java
Sun Jul 22 13:06:16 2012
@@ -720,7 +720,7 @@ public class T4AndT6Compression {
         int first = 0;
         int last = entries.length - 1;
         do {
-            int middle = (first + last) >>> 2;
+            int middle = (first + last) >>> 1;
             if (entries[middle].value.intValue() <= value
                     && ((middle + 1) >= entries.length || value < entries[middle
+ 1].value
                             .intValue())) {



Mime
View raw message