Skip to content

Commit

Permalink
spotless fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
  • Loading branch information
gbbafna committed Aug 31, 2023
1 parent ae7d8c6 commit 8ca440f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* Crypto plugin interface used for encryption and decryption.
*/
public interface CryptoManager<T , U> extends RefCounted {
public interface CryptoManager<T, U> extends RefCounted {

/**
* @return key provider type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private String validateAndGetAlgorithmId(String algorithm) {
}

// package private for tests
CryptoHandler<? , ?> createCryptoProvider(
CryptoHandler<?, ?> createCryptoProvider(
String algorithm,
CachingCryptoMaterialsManager materialsManager,
MasterKeyProvider masterKeyProvider
Expand Down Expand Up @@ -103,7 +103,12 @@ CachingCryptoMaterialsManager createMaterialsManager(MasterKeyProvider masterKey
}

// package private for tests
<T, U> CryptoManager<?, ?> createCryptoManager(CryptoHandler<T, U> cryptoHandler, String keyProviderType, String keyProviderName, Runnable onClose) {
<T, U> CryptoManager<?, ?> createCryptoManager(
CryptoHandler<T, U> cryptoHandler,
String keyProviderType,
String keyProviderName,
Runnable onClose
) {
return new CryptoManagerImpl<T, U>(keyProviderName, keyProviderType) {
@Override
protected void closeInternal() {
Expand All @@ -127,11 +132,10 @@ public CryptoHandler<T, U> getCryptoProvider() {
};
}

private static abstract class CryptoManagerImpl<T , U> extends AbstractRefCounted implements CryptoManager<T, U> {
private static abstract class CryptoManagerImpl<T, U> extends AbstractRefCounted implements CryptoManager<T, U> {
public CryptoManagerImpl(String keyProviderName, String keyProviderType) {
super(keyProviderName + "-" + keyProviderType);
}
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import java.util.Map;

@SuppressWarnings({ "rawtypes" })
// Move this to EncryptionHandler
public class EncryptionMetadata {
private static final CiphertextType CIPHERTEXT_TYPE = CiphertextType.CUSTOMER_AUTHENTICATED_ENCRYPTED_DATA;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ private long decryptAndVerify(InputStream encryptedStream, long encSize, File fi

public void testMultiPartStreamsEncryption() throws IOException, URISyntaxException {
EncryptionMetadata cryptoContextObj = frameCryptoProvider.initEncryptionMetadata();
EncryptionMetadata encryptionMetadata = cryptoContextObj;
EncryptionMetadata encryptionMetadata = cryptoContextObj;
String path = CryptoTests.class.getResource("/raw_content_for_crypto_test").toURI().getPath();
File file = new File(path);
byte[] encryptedContent = new byte[1024 * 20];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*Ø
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
Expand Down

0 comments on commit 8ca440f

Please sign in to comment.