Merge "Remove unnecessary 'return' statements"

This commit is contained in:
Shawn Pearce
2013-11-18 03:51:15 +00:00
committed by Gerrit Code Review
7 changed files with 2 additions and 18 deletions

View File

@@ -57,12 +57,10 @@ public class SideBySideTable extends AbstractPatchContentTable {
protected void createFileCommentEditorOnSideA() { protected void createFileCommentEditorOnSideA() {
createCommentEditor(R_HEAD + 1, A, R_HEAD, FILE_SIDE_A); createCommentEditor(R_HEAD + 1, A, R_HEAD, FILE_SIDE_A);
return;
} }
protected void createFileCommentEditorOnSideB() { protected void createFileCommentEditorOnSideB() {
createCommentEditor(R_HEAD + 1, B, R_HEAD, FILE_SIDE_B); createCommentEditor(R_HEAD + 1, B, R_HEAD, FILE_SIDE_B);
return;
} }
@Override @Override

View File

@@ -90,11 +90,8 @@ public class UnifiedDiffTable extends AbstractPatchContentTable {
if (idSideA != null && idSideA.equals(psId)) { if (idSideA != null && idSideA.equals(psId)) {
rowOfTableHeaderB++; rowOfTableHeaderB++;
borderRowOfFileComment++; borderRowOfFileComment++;
return; } else if (idSideB.equals(psId)) {
}
if (idSideB.equals(psId)) {
borderRowOfFileComment++; borderRowOfFileComment++;
return;
} }
} }
} }
@@ -137,11 +134,8 @@ public class UnifiedDiffTable extends AbstractPatchContentTable {
if (idSideA != null && idSideA.equals(psId)) { if (idSideA != null && idSideA.equals(psId)) {
rowOfTableHeaderB--; rowOfTableHeaderB--;
borderRowOfFileComment--; borderRowOfFileComment--;
return; } else if (idSideB.equals(psId)) {
}
if (idSideB.equals(psId)) {
borderRowOfFileComment--; borderRowOfFileComment--;
return;
} }
} }
} }
@@ -171,7 +165,6 @@ public class UnifiedDiffTable extends AbstractPatchContentTable {
protected void createFileCommentEditorOnSideA() { protected void createFileCommentEditorOnSideA() {
createCommentEditor(R_HEAD + 1, PC, R_HEAD, FILE_SIDE_A); createCommentEditor(R_HEAD + 1, PC, R_HEAD, FILE_SIDE_A);
return;
} }
protected void createFileCommentEditorOnSideB() { protected void createFileCommentEditorOnSideB() {

View File

@@ -104,7 +104,6 @@ final class GerritJsonServlet extends JsonServlet<GerritJsonServlet.GerritCall>
// //
if (!call.requireXsrfValid() || !session.get().isSignedIn()) { if (!call.requireXsrfValid() || !session.get().isSignedIn()) {
call.onFailure(new NotSignedInException()); call.onFailure(new NotSignedInException());
return;
} }
} }
} }

View File

@@ -467,8 +467,6 @@ public class ChangeJson {
label.value = score; label.value = score;
} }
} }
return;
} }
private void setAllApprovals(ChangeData cd, private void setAllApprovals(ChangeData cd,

View File

@@ -1179,7 +1179,6 @@ public class ReceiveCommits {
walk.markStart(h); walk.markStart(h);
if (walk.next() == null) { if (walk.next() == null) {
reject(magicBranch.cmd, "no common ancestry"); reject(magicBranch.cmd, "no common ancestry");
return;
} }
} finally { } finally {
walk.reset(); walk.reset();
@@ -1188,7 +1187,6 @@ public class ReceiveCommits {
} catch (IOException e) { } catch (IOException e) {
magicBranch.cmd.setResult(REJECTED_MISSING_OBJECT); magicBranch.cmd.setResult(REJECTED_MISSING_OBJECT);
log.error("Invalid pack upload; one or more objects weren't sent", e); log.error("Invalid pack upload; one or more objects weren't sent", e);
return;
} }
} }

View File

@@ -512,7 +512,6 @@ public class QueryShell {
obj.addProperty("type", "error"); obj.addProperty("type", "error");
obj.addProperty("message", "Unsupported Json variant"); obj.addProperty("message", "Unsupported Json variant");
println(obj.toString()); println(obj.toString());
return;
} }
} }

View File

@@ -72,7 +72,6 @@ final class ReviewDbDataSourceProvider implements Provider<DataSource>,
Class<?> type = Class.forName("com.mchange.v2.c3p0.DataSources"); Class<?> type = Class.forName("com.mchange.v2.c3p0.DataSources");
if (type.isInstance(ds)) { if (type.isInstance(ds)) {
type.getMethod("destroy", DataSource.class).invoke(null, ds); type.getMethod("destroy", DataSource.class).invoke(null, ds);
return;
} }
} catch (Throwable bad) { } catch (Throwable bad) {
// Oh well, its not a c3p0 pooled connection. // Oh well, its not a c3p0 pooled connection.