Get rid of empty if-statements
Change-Id: Ie1a6a8e60bcb7affd4c8fe7432d6bb93ca499637
This commit is contained in:
@@ -196,8 +196,7 @@ public class Daemon extends SiteProgram {
|
||||
}
|
||||
|
||||
manager.add(GarbageCollectionLogFile.start(getSitePath()));
|
||||
if (consoleLog) {
|
||||
} else {
|
||||
if (!consoleLog) {
|
||||
manager.add(ErrorLogFile.start(getSitePath()));
|
||||
}
|
||||
|
||||
|
||||
@@ -68,10 +68,9 @@ public class Section {
|
||||
flags.cfg.setStringList(section, subsection, name, all);
|
||||
}
|
||||
|
||||
} else if (all.size() == 0) {
|
||||
} else if (all.size() == 1) {
|
||||
flags.cfg.unset(section, subsection, name);
|
||||
} else {
|
||||
} else if (all.size() != 0) {
|
||||
all.remove(0);
|
||||
flags.cfg.setStringList(section, subsection, name, all);
|
||||
}
|
||||
|
||||
@@ -154,9 +154,10 @@ public class ReceiveCommitsAdvertiseRefsHook implements AdvertiseRefsHook {
|
||||
RevCommit c;
|
||||
try {
|
||||
while ((c = rw.next()) != null && toInclude.size() < max) {
|
||||
if (alreadySending.contains(c)) {
|
||||
} else if (toInclude.contains(c)) {
|
||||
} else if (c.getParentCount() > 1) {
|
||||
if (alreadySending.contains(c)
|
||||
|| toInclude.contains(c)
|
||||
|| c.getParentCount() > 1) {
|
||||
// Do nothing
|
||||
} else if (toInclude.size() < base) {
|
||||
toInclude.add(c);
|
||||
} else {
|
||||
|
||||
@@ -177,7 +177,7 @@ class PatchScriptBuilder {
|
||||
|
||||
boolean hugeFile = false;
|
||||
if (a.mode == FileMode.GITLINK || b.mode == FileMode.GITLINK) {
|
||||
|
||||
// Do nothing
|
||||
} else if (a.src == b.src && a.size() <= context
|
||||
&& content.getEdits().isEmpty()) {
|
||||
// Odd special case; the files are identical (100% rename or copy)
|
||||
|
||||
@@ -338,8 +338,7 @@ public abstract class BaseCommand implements Command {
|
||||
return 127;
|
||||
}
|
||||
|
||||
if (e instanceof UnloggedFailure) {
|
||||
} else {
|
||||
if (!(e instanceof UnloggedFailure)) {
|
||||
final StringBuilder m = new StringBuilder();
|
||||
m.append("Internal server error");
|
||||
if (userProvider.get().isIdentifiedUser()) {
|
||||
|
||||
Reference in New Issue
Block a user