mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Update plugins/deps, fix bug in base64 decoding
This commit is contained in:
parent
744631cea0
commit
5b14d23194
|
@ -92,8 +92,10 @@ final class PDF417CodewordDecoder {
|
|||
private static int getClosestDecodedValue(int[] moduleBitCount) {
|
||||
int bitCountSum = MathUtils.sum(moduleBitCount);
|
||||
float[] bitCountRatios = new float[PDF417Common.BARS_IN_MODULE];
|
||||
for (int i = 0; i < bitCountRatios.length; i++) {
|
||||
bitCountRatios[i] = moduleBitCount[i] / (float) bitCountSum;
|
||||
if (bitCountSum > 1) {
|
||||
for (int i = 0; i < bitCountRatios.length; i++) {
|
||||
bitCountRatios[i] = moduleBitCount[i] / (float) bitCountSum;
|
||||
}
|
||||
}
|
||||
float bestMatchError = Float.MAX_VALUE;
|
||||
int bestMatch = -1;
|
||||
|
|
|
@ -27,7 +27,7 @@ final class Java8Base64Decoder extends Base64Decoder {
|
|||
try {
|
||||
Object decoder = Class.forName("java.util.Base64")
|
||||
.getMethod("getDecoder").invoke(null);
|
||||
return (byte[]) Class.forName("java.util.Base64.Decoder")
|
||||
return (byte[]) Class.forName("java.util.Base64$Decoder")
|
||||
.getMethod("decode", String.class).invoke(decoder, s);
|
||||
} catch (IllegalAccessException | InvocationTargetException |
|
||||
NoSuchMethodException | ClassNotFoundException e) {
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -88,9 +88,9 @@
|
|||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.7</java.version>
|
||||
<maven.version.min>3.2.1</maven.version.min>
|
||||
<proguard.version>5.3.2</proguard.version>
|
||||
<proguard.version>5.3.3</proguard.version>
|
||||
<proguard.plugin.version>2.0.14</proguard.plugin.version>
|
||||
<slf4j.version>1.7.24</slf4j.version>
|
||||
<slf4j.version>1.7.25</slf4j.version>
|
||||
<!-- This can't reference project.version as some subprojects version differently -->
|
||||
<zxing.version>3.3.1-SNAPSHOT</zxing.version>
|
||||
<android.platform>22</android.platform>
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
<plugin>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>9.4.2.v20170220</version>
|
||||
<version>9.4.3.v20170317</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
|
Loading…
Reference in a new issue