mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 20:59:54 +01:00
Whitespace-only code formatting changes.
This commit is contained in:
@@ -13,7 +13,7 @@ public class ShutdownManagerImplTest extends BriarTestCase {
|
||||
public void testAddAndRemove() {
|
||||
ShutdownManager s = createShutdownManager();
|
||||
Set<Integer> handles = new HashSet<Integer>();
|
||||
for(int i = 0; i < 100; i++) {
|
||||
for (int i = 0; i < 100; i++) {
|
||||
int handle = s.addShutdownHook(new Runnable() {
|
||||
public void run() {}
|
||||
});
|
||||
@@ -21,9 +21,9 @@ public class ShutdownManagerImplTest extends BriarTestCase {
|
||||
assertTrue(handles.add(handle));
|
||||
}
|
||||
// The hooks should be removable
|
||||
for(int handle : handles) assertTrue(s.removeShutdownHook(handle));
|
||||
for (int handle : handles) assertTrue(s.removeShutdownHook(handle));
|
||||
// The hooks should no longer be removable
|
||||
for(int handle : handles) assertFalse(s.removeShutdownHook(handle));
|
||||
for (int handle : handles) assertFalse(s.removeShutdownHook(handle));
|
||||
}
|
||||
|
||||
protected ShutdownManager createShutdownManager() {
|
||||
|
||||
@@ -14,12 +14,12 @@ public class WindowsShutdownManagerImplTest extends ShutdownManagerImplTest {
|
||||
public void testManagerWaitsForHooksToRun() {
|
||||
WindowsShutdownManagerImpl s = new WindowsShutdownManagerImpl();
|
||||
SlowHook[] hooks = new SlowHook[10];
|
||||
for(int i = 0; i < hooks.length; i++) {
|
||||
for (int i = 0; i < hooks.length; i++) {
|
||||
hooks[i] = new SlowHook();
|
||||
s.addShutdownHook(hooks[i]);
|
||||
}
|
||||
s.runShutdownHooks();
|
||||
for(int i = 0; i < hooks.length; i++) assertTrue(hooks[i].finished);
|
||||
for (int i = 0; i < hooks.length; i++) assertTrue(hooks[i].finished);
|
||||
}
|
||||
|
||||
private static class SlowHook implements Runnable {
|
||||
@@ -30,7 +30,7 @@ public class WindowsShutdownManagerImplTest extends ShutdownManagerImplTest {
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
finished = true;
|
||||
} catch(InterruptedException e) {
|
||||
} catch (InterruptedException e) {
|
||||
fail();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user