aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/revplot
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2018-05-16 16:34:16 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2018-05-18 17:59:45 +0200
commitf3ec7cf3f0436a79e252251a31dbc62694555897 (patch)
tree49a647fa520bb5a1016425df26357947f8dab95c /org.eclipse.jgit/src/org/eclipse/jgit/revplot
parent667e30678a6bad26f4d4d412e996b293e52e5b87 (diff)
downloadjgit-f3ec7cf3f0436a79e252251a31dbc62694555897.tar.gz
jgit-f3ec7cf3f0436a79e252251a31dbc62694555897.zip
Remove further unnecessary 'final' keywords
Remove it from * package private functions. * try blocks * for loops this was done with the following python script: $ cat f.py import sys import re import os def replaceFinal(m): return m.group(1) + "(" + m.group(2).replace('final ', '') + ")" methodDecl = re.compile(r"^([\t ]*[a-zA-Z_ ]+)\(([^)]*)\)") def subst(fn): input = open(fn) os.rename(fn, fn + "~") dest = open(fn, 'w') for l in input: l = methodDecl.sub(replaceFinal, l) dest.write(l) dest.close() for root, dirs, files in os.walk(".", topdown=False): for f in files: if not f.endswith('.java'): continue full = os.path.join(root, f) print full subst(full) Change-Id: If533a75a417594fc893e7c669d2c1f0f6caeb7ca Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/revplot')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommit.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java2
3 files changed, 7 insertions, 7 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java
index c12acb40c2..58e2106fe2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java
@@ -99,7 +99,7 @@ public abstract class AbstractPlotRenderer<TLane extends PlotLane, TColor> {
final TColor myColor = laneColor(myLane);
int maxCenter = myLaneX;
- for (final TLane passingLane : (TLane[]) commit.passingLanes) {
+ for (TLane passingLane : (TLane[]) commit.passingLanes) {
final int cx = laneC(passingLane);
final TColor c = laneColor(passingLane);
drawLine(c, cx, 0, cx, h, LINE_WIDTH);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommit.java b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommit.java
index fecc48d551..9914b0c991 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommit.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommit.java
@@ -88,15 +88,15 @@ public class PlotCommit<L extends PlotLane> extends RevCommit {
refs = NO_REFS;
}
- void addForkingOffLane(final PlotLane f) {
+ void addForkingOffLane(PlotLane f) {
forkingOffLanes = addLane(f, forkingOffLanes);
}
- void addPassingLane(final PlotLane c) {
+ void addPassingLane(PlotLane c) {
passingLanes = addLane(c, passingLanes);
}
- void addMergingLane(final PlotLane m) {
+ void addMergingLane(PlotLane m) {
mergingLanes = addLane(m, mergingLanes);
}
@@ -115,7 +115,7 @@ public class PlotCommit<L extends PlotLane> extends RevCommit {
return lanes;
}
- void addChild(final PlotCommit c) {
+ void addChild(PlotCommit c) {
final int cnt = children.length;
if (cnt == 0)
children = new PlotCommit[] { c };
@@ -164,7 +164,7 @@ public class PlotCommit<L extends PlotLane> extends RevCommit {
* @return true if the given commit built on top of this commit.
*/
public final boolean isChild(PlotCommit c) {
- for (final PlotCommit a : children)
+ for (PlotCommit a : children)
if (a == c)
return true;
return false;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java
index d952fa67ea..5e153164ad 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java
@@ -120,7 +120,7 @@ public class PlotCommitList<L extends PlotLane> extends
@SuppressWarnings("unchecked")
public void findPassingThrough(final PlotCommit<L> currCommit,
final Collection<L> result) {
- for (final PlotLane p : currCommit.passingLanes)
+ for (PlotLane p : currCommit.passingLanes)
result.add((L) p);
}