implementing robolectric and mockito

This commit is contained in:
Ernir Erlingsson
2016-04-28 15:28:35 +02:00
parent aa3ef896f5
commit adb7d37f86
18 changed files with 1681 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
package org.briarproject.system;
import static java.util.logging.Level.WARNING;
import org.briarproject.api.system.SeedProvider;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -13,7 +13,7 @@ import java.util.Collections;
import java.util.List;
import java.util.logging.Logger;
import org.briarproject.api.system.SeedProvider;
import static java.util.logging.Level.WARNING;
class LinuxSeedProvider implements SeedProvider {
@@ -43,6 +43,8 @@ class LinuxSeedProvider implements SeedProvider {
} catch (IOException e) {
// On some devices /dev/urandom isn't writable - this isn't fatal
if (LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
} catch (NullPointerException e) {
if (LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
}
// Read the seed from the pool
try {