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.ImmutableSet;
import com.google.gerrit.entities.Change;
import com.google.gerrit.entities.Patch.ChangeType;
import com.google.gerrit.extensions.client.DiffPreferencesInfo;
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 ImmutableList<String> header;
private final DiffPreferencesInfo diffPrefs;
@@ -75,7 +73,6 @@ public class PatchScript {
private final PatchScriptFileInfo fileInfoB;
public PatchScript(
Change.Key ck,
ChangeType ct,
String on,
String nn,
@@ -96,7 +93,6 @@ public class PatchScript {
boolean bin,
String cma,
String cmb) {
changeId = ck;
changeType = ct;
header = h;
diffPrefs = dp;
@@ -110,10 +106,6 @@ public class PatchScript {
fileInfoB = new PatchScriptFileInfo(nn, nm, cb, mb, mtb, cmb);
}
public Change.Key getChangeId() {
return changeId;
}
public List<String> getPatchHeader() {
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.PatchScript;
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.Patch;
import com.google.gerrit.entities.Patch.ChangeType;
@@ -53,7 +52,6 @@ import org.eclipse.jgit.treewalk.TreeWalk;
class PatchScriptBuilder {
private Change change;
private DiffPreferencesInfo diffPrefs;
private final FileTypeRegistry registry;
private IntraLineDiffCalculator intralineDiffCalculator;
@@ -63,10 +61,6 @@ class PatchScriptBuilder {
registry = ftr;
}
void setChange(Change c) {
this.change = c;
}
void setDiffPrefs(DiffPreferencesInfo dp) {
diffPrefs = dp;
}
@@ -173,7 +167,6 @@ class PatchScriptBuilder {
new TextSource(a.src), new TextSource(b.src), finalEdits, comments);
return new PatchScript(
change.getKey(),
content.getChangeType(),
content.getOldName(),
content.getNewName(),

View File

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

View File

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