mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-22 07:39:53 +01:00
Lint cleanups.
This commit is contained in:
@@ -282,6 +282,8 @@ abstract class TorPlugin implements DuplexPlugin, EventHandler, EventListener {
|
||||
InputStream in = null;
|
||||
OutputStream out = null;
|
||||
try {
|
||||
// The done file may already exist from a previous installation
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
doneFile.delete();
|
||||
// Unzip the Tor binary to the filesystem
|
||||
in = getTorInputStream();
|
||||
@@ -303,7 +305,8 @@ abstract class TorPlugin implements DuplexPlugin, EventHandler, EventListener {
|
||||
in = getConfigInputStream();
|
||||
out = new FileOutputStream(configFile);
|
||||
copyAndClose(in, out);
|
||||
doneFile.createNewFile();
|
||||
if (!doneFile.createNewFile())
|
||||
LOG.warning("Failed to create done file");
|
||||
} catch (IOException e) {
|
||||
IoUtils.tryToClose(in, LOG, WARNING);
|
||||
IoUtils.tryToClose(out, LOG, WARNING);
|
||||
|
||||
@@ -318,6 +318,8 @@ public class AccountManagerImplTest extends BrambleMockTestCase {
|
||||
}
|
||||
|
||||
private void storeDatabaseKey(File f, String hex) throws IOException {
|
||||
// Create parent directory if it doesn't already exist
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
f.getParentFile().mkdirs();
|
||||
FileOutputStream out = new FileOutputStream(f);
|
||||
out.write(hex.getBytes("UTF-8"));
|
||||
|
||||
@@ -1393,7 +1393,6 @@ public class DatabaseComponentImplTest extends BrambleMockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void testMessageDependencies() throws Exception {
|
||||
int shutdownHandle = 12345;
|
||||
MessageId messageId2 = new MessageId(getRandomId());
|
||||
|
||||
Reference in New Issue
Block a user