aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.lfs.server/src/org
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.lfs.server/src/org
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.lfs.server/src/org')
-rw-r--r--org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java10
-rw-r--r--org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/SignerV4.java6
2 files changed, 8 insertions, 8 deletions
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java
index c229758d43..ed896adff2 100644
--- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java
+++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java
@@ -94,10 +94,10 @@ public class S3Repository implements LargeFileRepository {
@Override
public Response.Action getDownloadAction(AnyLongObjectId oid) {
URL endpointUrl = getObjectUrl(oid);
- Map<String, String> queryParams = new HashMap<String, String>();
+ Map<String, String> queryParams = new HashMap<>();
queryParams.put(X_AMZ_EXPIRES,
Integer.toString(s3Config.getExpirationSeconds()));
- Map<String, String> headers = new HashMap<String, String>();
+ Map<String, String> headers = new HashMap<>();
String authorizationQueryParameters = SignerV4.createAuthorizationQuery(
s3Config, endpointUrl, METHOD_GET, headers, queryParams,
UNSIGNED_PAYLOAD);
@@ -111,7 +111,7 @@ public class S3Repository implements LargeFileRepository {
public Response.Action getUploadAction(AnyLongObjectId oid, long size) {
cacheObjectMetaData(oid, size);
URL objectUrl = getObjectUrl(oid);
- Map<String, String> headers = new HashMap<String, String>();
+ Map<String, String> headers = new HashMap<>();
headers.put(X_AMZ_CONTENT_SHA256, oid.getName());
headers.put(HDR_CONTENT_LENGTH, Long.toString(size));
headers.put(X_AMZ_STORAGE_CLASS, s3Config.getStorageClass());
@@ -134,10 +134,10 @@ public class S3Repository implements LargeFileRepository {
@Override
public long getSize(AnyLongObjectId oid) throws IOException {
URL endpointUrl = getObjectUrl(oid);
- Map<String, String> queryParams = new HashMap<String, String>();
+ Map<String, String> queryParams = new HashMap<>();
queryParams.put(X_AMZ_EXPIRES,
Integer.toString(s3Config.getExpirationSeconds()));
- Map<String, String> headers = new HashMap<String, String>();
+ Map<String, String> headers = new HashMap<>();
String authorizationQueryParameters = SignerV4.createAuthorizationQuery(
s3Config, endpointUrl, METHOD_HEAD, headers, queryParams,
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/SignerV4.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/SignerV4.java
index 4149484c8c..a9b0ec46e4 100644
--- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/SignerV4.java
+++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/SignerV4.java
@@ -240,7 +240,7 @@ class SignerV4 {
private static String canonicalizeHeaderNames(
Map<String, String> headers) {
- List<String> sortedHeaders = new ArrayList<String>();
+ List<String> sortedHeaders = new ArrayList<>();
sortedHeaders.addAll(headers.keySet());
Collections.sort(sortedHeaders, String.CASE_INSENSITIVE_ORDER);
@@ -260,7 +260,7 @@ class SignerV4 {
return ""; //$NON-NLS-1$
}
- List<String> sortedHeaders = new ArrayList<String>();
+ List<String> sortedHeaders = new ArrayList<>();
sortedHeaders.addAll(headers.keySet());
Collections.sort(sortedHeaders, String.CASE_INSENSITIVE_ORDER);
@@ -305,7 +305,7 @@ class SignerV4 {
return ""; //$NON-NLS-1$
}
- SortedMap<String, String> sorted = new TreeMap<String, String>();
+ SortedMap<String, String> sorted = new TreeMap<>();
Iterator<Map.Entry<String, String>> pairs = parameters.entrySet()
.iterator();