mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -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) {
|
||||
Iterable<WifiConfiguration> existingConfigs = wifiManager.getConfiguredNetworks();
|
||||
for (WifiConfiguration existingConfig : existingConfigs) {
|
||||
String existingSSID = existingConfig.SSID;
|
||||
if (existingSSID != null && existingSSID.equals(ssid)) {
|
||||
return existingConfig.networkId;
|
||||
if (existingConfigs != null) {
|
||||
for (WifiConfiguration existingConfig : existingConfigs) {
|
||||
String existingSSID = existingConfig.SSID;
|
||||
if (existingSSID != null && existingSSID.equals(ssid)) {
|
||||
return existingConfig.networkId;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -311,7 +311,7 @@ public final class Encoder {
|
|||
case 12:
|
||||
return GenericGF.AZTEC_DATA_12;
|
||||
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.Test;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
|
@ -116,9 +115,6 @@ public final class BitArrayTestCase extends Assert {
|
|||
expected++;
|
||||
}
|
||||
int actual = array.getNextSet(query);
|
||||
if (actual != expected) {
|
||||
array.getNextSet(query);
|
||||
}
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ package com.google.zxing.common.reedsolomon;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
import java.util.Arrays;
|
||||
import java.util.BitSet;
|
||||
import java.util.Random;
|
||||
|
|
Loading…
Reference in a new issue