diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2019-10-17 09:01:25 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2019-10-17 10:20:14 +0900 |
commit | 98cdca9b5a830f1c2ceca52379d662a68109d43e (patch) | |
tree | d843141173394b4ea4e435553885749096d4fb79 /org.eclipse.jgit.http.test/tst | |
parent | 762f6212b4692b28f098ac597058bd6a489b8b49 (diff) | |
download | jgit-98cdca9b5a830f1c2ceca52379d662a68109d43e.tar.gz jgit-98cdca9b5a830f1c2ceca52379d662a68109d43e.zip |
Enable and fix "Statement unnecessarily nested within else clause" warnings
Since [1] the gerrit project includes jgit as a submodule, and has this
warning enabled, resulting in 100s of warnings in the console.
Also enable the warning here, and fix them.
At the same time, add missing braces around adjacent and nearby one-line
blocks.
[1] https://gerrit-review.googlesource.com/c/gerrit/+/227897
Change-Id: I81df3fc7ed6eedf6874ce1a3bedfa727a1897e4c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.http.test/tst')
-rw-r--r-- | org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java index 3401e264c0..99aa06b17c 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java @@ -331,9 +331,8 @@ public class SmartClientSmartServerTest extends AllFactoriesHttpTestCase { String fragment = u.getRawFragment(); if (fragment != null) { return u.getRawPath() + '#' + fragment; - } else { - return u.getRawPath(); } + return u.getRawPath(); } catch (URISyntaxException e) { return url; } |