diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2017-02-20 13:17:27 +0900 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2017-02-20 22:47:23 +0100 |
commit | 3b4448637fbb9d74e0c9d44048ba76bb7c1214ce (patch) | |
tree | 85bbb116d5b0336cb365a3f5a4d6c074afe80cc6 /org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt | |
parent | 43eb8511f5d8225c0b4e2f899db2126334e5facf (diff) | |
download | jgit-3b4448637fbb9d74e0c9d44048ba76bb7c1214ce.tar.gz jgit-3b4448637fbb9d74e0c9d44048ba76bb7c1214ce.zip |
Enable and fix warnings about redundant specification of type arguments
Since the introduction of generic type parameter inference in Java 7,
it's not necessary to explicitly specify the type of generic parameters.
Enable the warning in Eclipse, and fix all occurrences.
Change-Id: I9158caf1beca5e4980b6240ac401f3868520aad0
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java | 2 | ||||
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java index b531ba65a4..020b62580f 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java @@ -141,7 +141,7 @@ public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser { @Override public void parseArgument(final String... args) throws CmdLineException { - final ArrayList<String> tmp = new ArrayList<String>(args.length); + final ArrayList<String> tmp = new ArrayList<>(args.length); for (int argi = 0; argi < args.length; argi++) { final String str = args[argi]; if (str.equals("--")) { //$NON-NLS-1$ diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java index e468023448..b873c3dc2c 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java @@ -81,7 +81,7 @@ public class PathTreeFilterHandler extends OptionHandler<TreeFilter> { @Override public int parseArguments(final Parameters params) throws CmdLineException { - final List<PathFilter> filters = new ArrayList<PathFilter>(); + final List<PathFilter> filters = new ArrayList<>(); for (int idx = 0;; idx++) { final String path; try { |