Use Map.of() for statically defined map
This commit is contained in:
parent
a96865d0f5
commit
489519a982
|
@ -76,11 +76,10 @@ public class AttachmentControllerV3 extends AttachmentControllerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Map<String, String> getHeaderMap(@Nonnull CanonicalRequest canonicalRequest) {
|
private static Map<String, String> getHeaderMap(@Nonnull CanonicalRequest canonicalRequest) {
|
||||||
Map<String, String> result = new HashMap<>(3);
|
return Map.of(
|
||||||
result.put("host", canonicalRequest.getDomain());
|
"host", canonicalRequest.getDomain(),
|
||||||
result.put("x-goog-content-length-range", "1," + canonicalRequest.getMaxSizeInBytes());
|
"x-goog-content-length-range", "1," + canonicalRequest.getMaxSizeInBytes(),
|
||||||
result.put("x-goog-resumable", "start");
|
"x-goog-resumable", "start");
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String generateAttachmentKey() {
|
private String generateAttachmentKey() {
|
||||||
|
|
Loading…
Reference in New Issue