Fix a bunch of static analysis warnings

This commit is contained in:
Cameron Gutman
2014-10-30 00:21:34 -07:00
parent 419c4c5592
commit e8de7908fd
19 changed files with 52 additions and 52 deletions

View File

@@ -52,7 +52,7 @@ public class AndroidCryptoProvider implements LimelightCryptoProvider {
private RSAPrivateKey key;
private byte[] pemCertBytes;
private static Object globalCryptoLock = new Object();
private static final Object globalCryptoLock = new Object();
static {
// Install the Bouncy Castle provider
@@ -74,7 +74,10 @@ public class AndroidCryptoProvider implements LimelightCryptoProvider {
try {
FileInputStream fin = new FileInputStream(f);
byte[] fileData = new byte[(int) f.length()];
fin.read(fileData);
if (fin.read(fileData) != f.length()) {
// Failed to read
fileData = null;
}
fin.close();
return fileData;
} catch (IOException e) {