Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance #238

Merged
merged 5 commits into from
Oct 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Applies code inspection suggestions 🏫
  • Loading branch information
jakobvogel committed Oct 19, 2023
commit bab6625717ce8a5ac8316bf31a4c8c5270ec7b9f
2 changes: 1 addition & 1 deletion src/main/java/ninja/AwsLegacyHashCalculator.java
Original file line number Diff line number Diff line change
@@ -117,7 +117,7 @@ public String computeHash(WebContext webContext, String pathPrefix) throws Excep
SecretKeySpec keySpec = new SecretKeySpec(storage.getAwsSecretKey().getBytes(), "HmacSHA1");
Mac mac = Mac.getInstance("HmacSHA1");
mac.init(keySpec);
byte[] result = mac.doFinal(stringToSign.toString().getBytes(StandardCharsets.UTF_8.name()));
byte[] result = mac.doFinal(stringToSign.toString().getBytes(StandardCharsets.UTF_8));
return Base64.getEncoder().encodeToString(result);
}

3 changes: 1 addition & 2 deletions src/main/java/ninja/S3Dispatcher.java
Original file line number Diff line number Diff line change
@@ -58,7 +58,6 @@
import java.time.format.DateTimeFormatterBuilder;
import java.util.Base64;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -1037,7 +1036,7 @@ private void completeMultipartUpload(WebContext webContext,
uploadId,
parts.entrySet()
.stream()
.sorted(Comparator.comparing(Map.Entry::getKey))
.sorted(Map.Entry.comparingByKey())
.map(Map.Entry::getValue)
.toList());