Remove unnecessary assignments
Change-Id: I7890b296474811b16f57e029f9142655df1bc945
This commit is contained in:

committed by
Александр Рязанцев

parent
fc798093b8
commit
5c96817e31
@@ -182,7 +182,6 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
|
||||
formGrid.setText(row, labelIdx, Util.C.diffViewLabel());
|
||||
formGrid.setWidget(row, fieldIdx, diffView);
|
||||
row++;
|
||||
|
||||
add(formGrid);
|
||||
|
||||
|
@@ -115,6 +115,6 @@ public class MyProfileScreen extends SettingsScreen {
|
||||
info.setText(row++, fieldIdx, account.getFullName());
|
||||
info.setText(row++, fieldIdx, account.getPreferredEmail());
|
||||
info.setText(row++, fieldIdx, mediumFormat(account.getRegisteredOn()));
|
||||
info.setText(row++, fieldIdx, account.getId().toString());
|
||||
info.setText(row, fieldIdx, account.getId().toString());
|
||||
}
|
||||
}
|
||||
|
@@ -108,7 +108,7 @@ public class PatchSetSelectBox extends Composite {
|
||||
linkPanel.add(sideMarker);
|
||||
}
|
||||
|
||||
Anchor baseLink = null;
|
||||
Anchor baseLink;
|
||||
if (detail.getInfo().getParents().size() > 1) {
|
||||
baseLink = createLink(PatchUtil.C.patchBaseAutoMerge(), null);
|
||||
} else {
|
||||
|
@@ -29,7 +29,7 @@ class CookieBase64 {
|
||||
o = fill(enc, o, 'A', 'Z');
|
||||
o = fill(enc, o, '0', '9');
|
||||
enc[o++] = '-';
|
||||
enc[o++] = '.';
|
||||
enc[o] = '.';
|
||||
}
|
||||
|
||||
private static int fill(final char[] out, int o, final char f, final int l) {
|
||||
|
@@ -126,7 +126,7 @@ class PatchDetailServiceImpl extends BaseServiceImplementation implements
|
||||
final AsyncCallback<ChangeDetail> callback) {
|
||||
run(callback, new Action<ChangeDetail>() {
|
||||
public ChangeDetail run(ReviewDb db) throws OrmException, Failure {
|
||||
ReviewResult result = null;
|
||||
ReviewResult result;
|
||||
try {
|
||||
result = deleteDraftPatchSetFactory.create(psid).call();
|
||||
if (result.getErrors().size() > 0) {
|
||||
|
@@ -853,7 +853,7 @@ public class ChangeHookRunner implements ChangeHooks, LifecycleListener {
|
||||
output = new StringWriter();
|
||||
InputStreamReader input = new InputStreamReader(is);
|
||||
char[] buffer = new char[4096];
|
||||
int n = 0;
|
||||
int n;
|
||||
while ((n = input.read(buffer)) != -1) {
|
||||
output.write(buffer, 0, n);
|
||||
}
|
||||
|
@@ -135,7 +135,7 @@ public class CherryPick extends SubmitStrategy {
|
||||
final PatchSetApproval submitAudit =
|
||||
args.mergeUtil.getSubmitter(n.change.currentPatchSetId());
|
||||
|
||||
PersonIdent cherryPickCommitterIdent = null;
|
||||
PersonIdent cherryPickCommitterIdent;
|
||||
if (submitAudit != null) {
|
||||
cherryPickCommitterIdent =
|
||||
args.identifiedUserFactory.create(submitAudit.getAccountId())
|
||||
|
@@ -279,7 +279,7 @@ public class PatchListLoader extends CacheLoader<PatchListKey, PatchList> {
|
||||
}
|
||||
});
|
||||
|
||||
boolean couldMerge = false;
|
||||
boolean couldMerge;
|
||||
try {
|
||||
couldMerge = m.merge(b.getParents());
|
||||
} catch (IOException e) {
|
||||
|
@@ -117,7 +117,7 @@ public class PermissionCollection {
|
||||
|
||||
for (PermissionRule rule : permission.getRules()) {
|
||||
SeenRule s = new SeenRule(section, permission, rule);
|
||||
boolean addRule = false;
|
||||
boolean addRule;
|
||||
if (rule.isBlock()) {
|
||||
addRule = seenBlockingRules.add(s);
|
||||
} else {
|
||||
|
@@ -265,7 +265,6 @@ public class QueryProcessor {
|
||||
for (ChangeDataSource s : sources) {
|
||||
matches.add(s.read());
|
||||
}
|
||||
sources = null;
|
||||
|
||||
List<List<ChangeData>> out = Lists.newArrayListWithCapacity(cnt);
|
||||
for (int i = 0; i < cnt; i++) {
|
||||
|
@@ -97,7 +97,7 @@ public class SubmoduleSectionParser {
|
||||
}
|
||||
|
||||
final String urlExtractedPath = new URI(url).getPath();
|
||||
String projectName = urlExtractedPath;
|
||||
String projectName;
|
||||
int fromIndex = urlExtractedPath.length() - 1;
|
||||
while (fromIndex > 0) {
|
||||
fromIndex = urlExtractedPath.lastIndexOf('/', fromIndex - 1);
|
||||
|
@@ -210,7 +210,7 @@ public class SubmoduleSectionParserTest extends LocalDiskRepositoryTestCase {
|
||||
section.getBranch());
|
||||
|
||||
if (THIS_SERVER.equals(new URI(section.getUrl()).getHost())) {
|
||||
String projectNameCandidate = null;
|
||||
String projectNameCandidate;
|
||||
final String urlExtractedPath = new URI(section.getUrl()).getPath();
|
||||
int fromIndex = urlExtractedPath.length() - 1;
|
||||
while (fromIndex > 0) {
|
||||
|
@@ -75,7 +75,7 @@ public class LsUserRefs extends SshCommand {
|
||||
|
||||
@Override
|
||||
protected void run() throws Failure {
|
||||
Account userAccount = null;
|
||||
Account userAccount;
|
||||
try {
|
||||
userAccount = accountResolver.find(userName);
|
||||
} catch (OrmException e) {
|
||||
|
@@ -411,7 +411,7 @@ public class ReviewCommand extends SshCommand {
|
||||
}
|
||||
|
||||
for (LabelType type : allProjectsControl.getLabelTypes().getLabelTypes()) {
|
||||
String usage = "";
|
||||
String usage;
|
||||
usage = "score for " + type.getName() + "\n";
|
||||
|
||||
for (LabelValue v : type.getValues()) {
|
||||
|
@@ -287,7 +287,7 @@ final class SetAccountCommand extends BaseCommand {
|
||||
private List<String> readSshKey(final List<String> sshKeys)
|
||||
throws UnsupportedEncodingException, IOException {
|
||||
if (!sshKeys.isEmpty()) {
|
||||
String sshKey = "";
|
||||
String sshKey;
|
||||
int idx = sshKeys.indexOf("-");
|
||||
if (idx >= 0) {
|
||||
sshKey = "";
|
||||
|
Reference in New Issue
Block a user