Skip to content

Commit

Permalink
Fix spotbugs issues
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenbaker committed Aug 28, 2023
1 parent 46e853c commit f6f4624
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@
<Bug pattern="EI_EXPOSE_REP" />
</Match>

<Match>
<Class name="software.amazon.awssdk.http.auth.aws.crt.internal.signer.V4aContext" />
<Method name="getSignature" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>

<Match>
<Class name="software.amazon.awssdk.protocols.json.internal.unmarshall.JsonProtocolUnmarshaller" />
<Method name="unmarshallStructured" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,12 @@ private static AwsSigningResult signTrailerHeaders(Map<String, List<String>> hea
* Using a template that incorporates the previous calculated signature, sign the string and return it.
*/
public byte[] sign(byte[] chunkBody) {
previousSignature = signChunk(chunkBody, previousSignature, signingConfig);
return previousSignature;
return signChunk(chunkBody, previousSignature, signingConfig);
}

public byte[] sign(Map<String, List<String>> headerMap) {
AwsSigningResult result = signTrailerHeaders(headerMap, previousSignature, signingConfig);
previousSignature = result != null ? result.getSignature() : null;
return previousSignature;
return result != null ? result.getSignature() : null;
}

public void reset() {
Expand Down

0 comments on commit f6f4624

Please sign in to comment.