diff options
Diffstat (limited to 'org.eclipse.jgit.lfs.server/src')
-rw-r--r-- | org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java | 10 | ||||
-rw-r--r-- | org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/SignerV4.java | 6 |
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(); |