Whitespace-only code formatting changes.

This commit is contained in:
akwizgran
2015-11-30 09:38:25 +00:00
parent 1950c13ffb
commit 027ae8340f
202 changed files with 2993 additions and 2993 deletions

View File

@@ -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() {

View File

@@ -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();
}
}