PatchScript: Remove unused 'changeId' field
Change-Id: I1c06cf59e3f1de24c3f4317b7747d697a0f91144
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -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(),
|
||||
|
@@ -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(
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user