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