Remove unneeded finals
Change-Id: I8928a74f1cb24225652fe4958a78cc931888563e
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewersbyblame/ChangeUpdatedListener.java b/src/main/java/com/googlesource/gerrit/plugins/reviewersbyblame/ChangeUpdatedListener.java
index 56ca018..1ee6476 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewersbyblame/ChangeUpdatedListener.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewersbyblame/ChangeUpdatedListener.java
@@ -61,15 +61,15 @@
@Inject
ChangeUpdatedListener(
- final ReviewersByBlame.Factory reviewersByBlameFactory,
- final GitRepositoryManager repoManager,
- final WorkQueue workQueue,
- final IdentifiedUser.GenericFactory identifiedUserFactory,
- final ThreadLocalRequestContext tl,
- final SchemaFactory<ReviewDb> schemaFactory,
- final PluginConfigFactory cfg,
- final ChangeData.Factory changeDataFactory,
- final @PluginName String pluginName) {
+ ReviewersByBlame.Factory reviewersByBlameFactory,
+ GitRepositoryManager repoManager,
+ WorkQueue workQueue,
+ IdentifiedUser.GenericFactory identifiedUserFactory,
+ ThreadLocalRequestContext tl,
+ SchemaFactory<ReviewDb> schemaFactory,
+ PluginConfigFactory cfg,
+ ChangeData.Factory changeDataFactory,
+ @PluginName String pluginName) {
this.reviewersByBlameFactory = reviewersByBlameFactory;
this.repoManager = repoManager;
this.workQueue = workQueue;
@@ -114,7 +114,7 @@
RevWalk rw = new RevWalk(git);
ReviewDb reviewDb = schemaFactory.open()) {
Change.Id changeId = new Change.Id(e.change.get().number);
- final ChangeData cd = changeDataFactory.create(reviewDb, projectName, changeId);
+ ChangeData cd = changeDataFactory.create(reviewDb, projectName, changeId);
if (cd == null) {
log.warn(
"Change with id: '{}' on project key: '{}' not found.",
@@ -122,7 +122,7 @@
projectName.toString());
return;
}
- final Change change = cd.change();
+ Change change = cd.change();
PatchSet.Id psId = new PatchSet.Id(changeId, e.patchSet.get().number);
PatchSet ps = cd.patchSet(psId);
if (ps == null) {
@@ -130,13 +130,13 @@
return;
}
- final RevCommit commit = rw.parseCommit(ObjectId.fromString(e.patchSet.get().revision));
+ RevCommit commit = rw.parseCommit(ObjectId.fromString(e.patchSet.get().revision));
if (!ignoreSubjectRegEx.isEmpty() && commit.getShortMessage().matches(ignoreSubjectRegEx)) {
return;
}
- final Runnable task =
+ Runnable task =
reviewersByBlameFactory.create(commit, change, ps, maxReviewers, git, ignoreFileRegEx);
workQueue
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewersbyblame/ReviewersByBlame.java b/src/main/java/com/googlesource/gerrit/plugins/reviewersbyblame/ReviewersByBlame.java
index ba55862..d7f1a0d 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewersbyblame/ReviewersByBlame.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewersbyblame/ReviewersByBlame.java
@@ -77,16 +77,16 @@
@Inject
public ReviewersByBlame(
- final Emails emails,
- final AccountCache accountCache,
- final PatchListCache patchListCache,
+ Emails emails,
+ AccountCache accountCache,
+ PatchListCache patchListCache,
GerritApi gApi,
- @Assisted final RevCommit commit,
- @Assisted final Change change,
- @Assisted final PatchSet ps,
- @Assisted final int maxReviewers,
- @Assisted final Repository repo,
- @Assisted final String ignoreFileRegEx) {
+ @Assisted RevCommit commit,
+ @Assisted Change change,
+ @Assisted PatchSet ps,
+ @Assisted int maxReviewers,
+ @Assisted Repository repo,
+ @Assisted String ignoreFileRegEx) {
this.emails = emails;
this.accountCache = accountCache;
this.patchListCache = patchListCache;
@@ -156,7 +156,7 @@
* @param reviewers A set of reviewers with their weight mapped to their {@link Account}
* @return Reviewers that are best matches for this change, empty if none, never <code>null</code>
*/
- private Set<Account.Id> findTopReviewers(final Map<Account, Integer> reviewers) {
+ private Set<Account.Id> findTopReviewers(Map<Account, Integer> reviewers) {
Set<Account.Id> topReviewers = Sets.newHashSet();
List<Entry<Account, Integer>> entries =
Ordering.from(
@@ -181,8 +181,7 @@
* @param blameResult Result of blame computation
* @return a set of all possible reviewers, empty if none, never <code>null</code>
*/
- private Map<Account, Integer> getReviewersForPatch(
- final List<Edit> edits, final BlameResult blameResult) {
+ private Map<Account, Integer> getReviewersForPatch(List<Edit> edits, BlameResult blameResult) {
Map<Account, Integer> reviewers = Maps.newHashMap();
for (Edit edit : edits) {
for (int i = edit.getBeginA(); i < edit.getEndA(); i++) {
@@ -213,7 +212,7 @@
* @param parent Parent {@link RevCommit}
* @return Result of blame computation, null if the computation fails
*/
- private BlameResult computeBlame(final PatchListEntry entry, final RevCommit parent) {
+ private BlameResult computeBlame(PatchListEntry entry, RevCommit parent) {
BlameCommand blameCommand = new BlameCommand(repo);
blameCommand.setStartCommit(parent);
blameCommand.setFilePath(entry.getNewName());