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());
