mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Fixes from coverity
This commit is contained in:
parent
2e3021a510
commit
ec9487c0b2
|
@ -170,10 +170,12 @@ public final class WifiConfigManager extends AsyncTask<WifiParsedResult,Object,O
|
||||||
|
|
||||||
private static Integer findNetworkInExistingConfig(WifiManager wifiManager, String ssid) {
|
private static Integer findNetworkInExistingConfig(WifiManager wifiManager, String ssid) {
|
||||||
Iterable<WifiConfiguration> existingConfigs = wifiManager.getConfiguredNetworks();
|
Iterable<WifiConfiguration> existingConfigs = wifiManager.getConfiguredNetworks();
|
||||||
for (WifiConfiguration existingConfig : existingConfigs) {
|
if (existingConfigs != null) {
|
||||||
String existingSSID = existingConfig.SSID;
|
for (WifiConfiguration existingConfig : existingConfigs) {
|
||||||
if (existingSSID != null && existingSSID.equals(ssid)) {
|
String existingSSID = existingConfig.SSID;
|
||||||
return existingConfig.networkId;
|
if (existingSSID != null && existingSSID.equals(ssid)) {
|
||||||
|
return existingConfig.networkId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -311,7 +311,7 @@ public final class Encoder {
|
||||||
case 12:
|
case 12:
|
||||||
return GenericGF.AZTEC_DATA_12;
|
return GenericGF.AZTEC_DATA_12;
|
||||||
default:
|
default:
|
||||||
return null;
|
throw new IllegalArgumentException("Unsupported word size " + wordSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ package com.google.zxing.common;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.security.SecureRandom;
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -116,9 +115,6 @@ public final class BitArrayTestCase extends Assert {
|
||||||
expected++;
|
expected++;
|
||||||
}
|
}
|
||||||
int actual = array.getNextSet(query);
|
int actual = array.getNextSet(query);
|
||||||
if (actual != expected) {
|
|
||||||
array.getNextSet(query);
|
|
||||||
}
|
|
||||||
assertEquals(expected, actual);
|
assertEquals(expected, actual);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@ package com.google.zxing.common.reedsolomon;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.security.SecureRandom;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.BitSet;
|
import java.util.BitSet;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
Loading…
Reference in a new issue