diff options
author | Jonathan Nieder <jrn@google.com> | 2015-05-27 16:25:49 -0700 |
---|---|---|
committer | Jonathan Nieder <jrn@google.com> | 2015-05-27 16:49:34 -0700 |
commit | a5778b6f41c113b06687d47e606595ce8e2725a4 (patch) | |
tree | 917da7141410ccebd9a0ce50e3b4c23b3cbabb27 /org.eclipse.jgit | |
parent | 1287cdaf338c4f1b782985597de9358de534bbef (diff) | |
download | jgit-a5778b6f41c113b06687d47e606595ce8e2725a4.tar.gz jgit-a5778b6f41c113b06687d47e606595ce8e2725a4.zip |
archive: Drop unnecessary empty comments and 'final' qualifiers on locals
Early JGit code used comments to inform the Eclipse formatter about
where to break lines and used final in the hope of making code faster.
The ArchiveCommand command implementation imitated that style.
Nowadays the project relies less on the Eclipse formatter and relies
more on Java having sane performance with local variables that are not
explicitly marked 'final'. Removing the unnecessary empty comments and
'final' qualifiers makes this code more readable and more consistent
with recent JGit code.
Change-Id: I7a181432eda7e18bd32cf110d89c0efbe490c4f1
Signed-off-by: Jonathan Nieder <jrn@google.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java index 5f31be69f9..8543bd5f6a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java @@ -367,10 +367,10 @@ public class ArchiveCommand extends GitCommand<OutputStream> { try { try (TreeWalk walk = new TreeWalk(repo); RevWalk rw = new RevWalk(walk.getObjectReader())) { - final String pfx = prefix == null ? "" : prefix; //$NON-NLS-1$ - final T outa = fmt.createArchiveOutputStream(out, formatOptions); - final MutableObjectId idBuf = new MutableObjectId(); - final ObjectReader reader = walk.getObjectReader(); + String pfx = prefix == null ? "" : prefix; //$NON-NLS-1$ + T outa = fmt.createArchiveOutputStream(out, formatOptions); + MutableObjectId idBuf = new MutableObjectId(); + ObjectReader reader = walk.getObjectReader(); walk.reset(rw.parseTree(tree)); if (!paths.isEmpty()) @@ -414,7 +414,7 @@ public class ArchiveCommand extends GitCommand<OutputStream> { public OutputStream call() throws GitAPIException { checkCallable(); - final Format<?> fmt; + Format<?> fmt; if (format == null) fmt = formatBySuffix(suffix); else |