PatchScript: Remove unused 'changeId' field

Change-Id: I1c06cf59e3f1de24c3f4317b7747d697a0f91144
This commit is contained in:
Alice Kober-Sotzek
2020-04-01 18:21:43 +02:00
parent de19c2af94
commit 7c49c01fc6
4 changed files with 0 additions and 17 deletions

View File

@@ -16,7 +16,6 @@ package com.google.gerrit.common.data;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import com.google.gerrit.entities.Change;
import com.google.gerrit.entities.Patch.ChangeType; import com.google.gerrit.entities.Patch.ChangeType;
import com.google.gerrit.extensions.client.DiffPreferencesInfo; import com.google.gerrit.extensions.client.DiffPreferencesInfo;
import com.google.gerrit.extensions.client.DiffPreferencesInfo.Whitespace; import com.google.gerrit.extensions.client.DiffPreferencesInfo.Whitespace;
@@ -62,7 +61,6 @@ public class PatchScript {
} }
} }
private final Change.Key changeId;
private final ChangeType changeType; private final ChangeType changeType;
private final ImmutableList<String> header; private final ImmutableList<String> header;
private final DiffPreferencesInfo diffPrefs; private final DiffPreferencesInfo diffPrefs;
@@ -75,7 +73,6 @@ public class PatchScript {
private final PatchScriptFileInfo fileInfoB; private final PatchScriptFileInfo fileInfoB;
public PatchScript( public PatchScript(
Change.Key ck,
ChangeType ct, ChangeType ct,
String on, String on,
String nn, String nn,
@@ -96,7 +93,6 @@ public class PatchScript {
boolean bin, boolean bin,
String cma, String cma,
String cmb) { String cmb) {
changeId = ck;
changeType = ct; changeType = ct;
header = h; header = h;
diffPrefs = dp; diffPrefs = dp;
@@ -110,10 +106,6 @@ public class PatchScript {
fileInfoB = new PatchScriptFileInfo(nn, nm, cb, mb, mtb, cmb); fileInfoB = new PatchScriptFileInfo(nn, nm, cb, mb, mtb, cmb);
} }
public Change.Key getChangeId() {
return changeId;
}
public List<String> getPatchHeader() { public List<String> getPatchHeader() {
return header; return header;
} }

View File

@@ -21,7 +21,6 @@ import com.google.common.collect.ImmutableSet;
import com.google.gerrit.common.data.CommentDetail; import com.google.gerrit.common.data.CommentDetail;
import com.google.gerrit.common.data.PatchScript; import com.google.gerrit.common.data.PatchScript;
import com.google.gerrit.common.data.PatchScript.DisplayMethod; import com.google.gerrit.common.data.PatchScript.DisplayMethod;
import com.google.gerrit.entities.Change;
import com.google.gerrit.entities.FixReplacement; import com.google.gerrit.entities.FixReplacement;
import com.google.gerrit.entities.Patch; import com.google.gerrit.entities.Patch;
import com.google.gerrit.entities.Patch.ChangeType; import com.google.gerrit.entities.Patch.ChangeType;
@@ -53,7 +52,6 @@ import org.eclipse.jgit.treewalk.TreeWalk;
class PatchScriptBuilder { class PatchScriptBuilder {
private Change change;
private DiffPreferencesInfo diffPrefs; private DiffPreferencesInfo diffPrefs;
private final FileTypeRegistry registry; private final FileTypeRegistry registry;
private IntraLineDiffCalculator intralineDiffCalculator; private IntraLineDiffCalculator intralineDiffCalculator;
@@ -63,10 +61,6 @@ class PatchScriptBuilder {
registry = ftr; registry = ftr;
} }
void setChange(Change c) {
this.change = c;
}
void setDiffPrefs(DiffPreferencesInfo dp) { void setDiffPrefs(DiffPreferencesInfo dp) {
diffPrefs = dp; diffPrefs = dp;
} }
@@ -173,7 +167,6 @@ class PatchScriptBuilder {
new TextSource(a.src), new TextSource(b.src), finalEdits, comments); new TextSource(a.src), new TextSource(b.src), finalEdits, comments);
return new PatchScript( return new PatchScript(
change.getKey(),
content.getChangeType(), content.getChangeType(),
content.getOldName(), content.getOldName(),
content.getNewName(), content.getNewName(),

View File

@@ -276,7 +276,6 @@ public class PatchScriptFactory implements Callable<PatchScript> {
private PatchScriptBuilder newBuilder() { private PatchScriptBuilder newBuilder() {
final PatchScriptBuilder b = builderFactory.get(); final PatchScriptBuilder b = builderFactory.get();
b.setChange(notes.getChange());
b.setDiffPrefs(diffPrefs); b.setDiffPrefs(diffPrefs);
if (diffPrefs.intralineDifference) { if (diffPrefs.intralineDifference) {
b.setIntraLineDiffCalculator( b.setIntraLineDiffCalculator(

View File

@@ -132,7 +132,6 @@ public class PatchScriptFactoryForAutoFix implements Callable<PatchScript> {
private PatchScriptBuilder newBuilder() { private PatchScriptBuilder newBuilder() {
PatchScriptBuilder b = builderFactory.get(); PatchScriptBuilder b = builderFactory.get();
b.setChange(notes.getChange());
b.setDiffPrefs(diffPrefs); b.setDiffPrefs(diffPrefs);
return b; return b;
} }