summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit/src
diff options
context:
space:
mode:
authorAdrian Goerler <adrian.goerler@sap.com>2011-07-06 10:29:56 +0200
committerAdrian Goerler <adrian.goerler@sap.com>2011-07-06 10:29:56 +0200
commit2062d623e3c9190b27ea5c03e098c6eba0b75fdd (patch)
treec362cc4d3177893e4e7350a372ff292ce8e0a15b /org.eclipse.jgit.junit/src
parentac56c024c119c9782beb83f022deb3b258b754dc (diff)
downloadjgit-2062d623e3c9190b27ea5c03e098c6eba0b75fdd.tar.gz
jgit-2062d623e3c9190b27ea5c03e098c6eba0b75fdd.zip
Cleanup curly braces
Change-Id: I2de6439a3ad951a99d89e4aee02006c745d16510 Signed-off-by: Adrian Goerler <adrian.goerler@sap.com>
Diffstat (limited to 'org.eclipse.jgit.junit/src')
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java25
1 files changed, 9 insertions, 16 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java
index 8ed51fb908..6e74a04563 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java
@@ -217,29 +217,23 @@ public abstract class LocalDiskRepositoryTestCase {
private static boolean recursiveDelete(final String testName,
final File dir, boolean silent, boolean failOnError) {
assert !(silent && failOnError);
- if (!dir.exists()) {
+ if (!dir.exists())
return silent;
- }
final File[] ls = dir.listFiles();
- if (ls != null) {
+ if (ls != null)
for (int k = 0; k < ls.length; k++) {
final File e = ls[k];
- if (e.isDirectory()) {
+ if (e.isDirectory())
silent = recursiveDelete(testName, e, silent, failOnError);
- } else {
- if (!e.delete()) {
- if (!silent) {
- reportDeleteFailure(testName, failOnError, e);
- }
- silent = !failOnError;
- }
+ else if (!e.delete()) {
+ if (!silent)
+ reportDeleteFailure(testName, failOnError, e);
+ silent = !failOnError;
}
}
- }
if (!dir.delete()) {
- if (!silent) {
+ if (!silent)
reportDeleteFailure(testName, failOnError, dir);
- }
silent = !failOnError;
}
return silent;
@@ -447,9 +441,8 @@ public abstract class LocalDiskRepositoryTestCase {
private static String[] toEnvArray(final Map<String, String> env) {
final String[] envp = new String[env.size()];
int i = 0;
- for (Map.Entry<String, String> e : env.entrySet()) {
+ for (Map.Entry<String, String> e : env.entrySet())
envp[i++] = e.getKey() + "=" + e.getValue();
- }
return envp;
}