diff options
author | Christian Halstrick <christian.halstrick@gmail.com> | 2011-07-06 04:44:54 -0400 |
---|---|---|
committer | Code Review <codereview-daemon@eclipse.org> | 2011-07-06 04:44:54 -0400 |
commit | 9ea9537d7cd41c4bb36feb1296a5d98539cdaa21 (patch) | |
tree | 434cd36550e0c5269055b20780912c73c7d2a773 | |
parent | 18e10b41c919220fa774ada0a9d9ca94f286a099 (diff) | |
parent | 2062d623e3c9190b27ea5c03e098c6eba0b75fdd (diff) | |
download | jgit-9ea9537d7cd41c4bb36feb1296a5d98539cdaa21.tar.gz jgit-9ea9537d7cd41c4bb36feb1296a5d98539cdaa21.zip |
Merge "Cleanup curly braces"
-rw-r--r-- | org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java | 25 |
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; } |