aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/diff
diff options
context:
space:
mode:
authorDave Borowitz <dborowitz@google.com>2017-08-02 16:50:57 -0400
committerDave Borowitz <dborowitz@google.com>2017-08-02 16:50:57 -0400
commitcf9662cdfedac2ccefc3c9267357e828cfa3155d (patch)
tree9ff40ba44f47ae7ffc17511105c0e531e67fa217 /org.eclipse.jgit/src/org/eclipse/jgit/diff
parent9e54cbb6934893765f736cec09b7b8307aee66ab (diff)
downloadjgit-cf9662cdfedac2ccefc3c9267357e828cfa3155d.tar.gz
jgit-cf9662cdfedac2ccefc3c9267357e828cfa3155d.zip
Eliminate SectionParser construction boilerplate
Happily, most anonymous SectionParser implementations can be replaced with FooConfig::new, as long as the constructor takes a single Config arg. Many of these, the non-public ones, can in turn be inlined. A few remaining SectionParsers can be lambdas. Change-Id: I3f563e752dfd2007dd3a48d6d313d20e2685943a
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/diff')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java
index 324b99eb58..ee709495e5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java
@@ -54,12 +54,7 @@ import org.eclipse.jgit.util.StringUtils;
/** Keeps track of diff related configuration options. */
public class DiffConfig {
/** Key for {@link Config#get(SectionParser)}. */
- public static final Config.SectionParser<DiffConfig> KEY = new SectionParser<DiffConfig>() {
- @Override
- public DiffConfig parse(final Config cfg) {
- return new DiffConfig(cfg);
- }
- };
+ public static final Config.SectionParser<DiffConfig> KEY = DiffConfig::new;
/** Permissible values for {@code diff.renames}. */
public static enum RenameDetectionType {