aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/patch
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2017-02-20 13:17:27 +0900
committerMatthias Sohn <matthias.sohn@sap.com>2017-02-20 22:47:23 +0100
commit3b4448637fbb9d74e0c9d44048ba76bb7c1214ce (patch)
tree85bbb116d5b0336cb365a3f5a4d6c074afe80cc6 /org.eclipse.jgit/src/org/eclipse/jgit/patch
parent43eb8511f5d8225c0b4e2f899db2126334e5facf (diff)
downloadjgit-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/src/org/eclipse/jgit/patch')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedFileHeader.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/Patch.java4
3 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedFileHeader.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedFileHeader.java
index b104a49842..2c8f34e7cd 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedFileHeader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedFileHeader.java
@@ -183,7 +183,7 @@ public class CombinedFileHeader extends FileHeader {
protected void parseIndexLine(int ptr, final int eol) {
// "index $asha1,$bsha1..$csha1"
//
- final List<AbbreviatedObjectId> ids = new ArrayList<AbbreviatedObjectId>();
+ final List<AbbreviatedObjectId> ids = new ArrayList<>();
while (ptr < eol) {
final int comma = nextLF(buf, ptr, ',');
if (eol <= comma)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java
index 534c827314..eb28a0e2a3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java
@@ -305,7 +305,7 @@ public class FileHeader extends DiffEntry {
if (h.getFileHeader() != this)
throw new IllegalArgumentException(JGitText.get().hunkBelongsToAnotherFile);
if (hunks == null)
- hunks = new ArrayList<HunkHeader>();
+ hunks = new ArrayList<>();
hunks.add(h);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/Patch.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/Patch.java
index 40ea77e8ec..10ac449d12 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/Patch.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/Patch.java
@@ -83,8 +83,8 @@ public class Patch {
/** Create an empty patch. */
public Patch() {
- files = new ArrayList<FileHeader>();
- errors = new ArrayList<FormatError>(0);
+ files = new ArrayList<>();
+ errors = new ArrayList<>(0);
}
/**