Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-aws committed Oct 11, 2024
1 parent afe8dd1 commit 8243595
Showing 1 changed file with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@
import software.amazon.awssdk.core.SdkBytes;
import software.amazon.cryptography.dbencryptionsdk.dynamodb.ILegacyDynamoDbEncryptor;
import software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.LegacyPolicy;
import software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.legacy._ExternBase___default;
import software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.types.Error;
import software.amazon.cryptography.dbencryptionsdk.structuredencryption.internaldafny.types.CryptoAction;

import software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.legacy._ExternBase___default;

public class InternalLegacyOverride extends _ExternBase_InternalLegacyOverride {

private DynamoDBEncryptor encryptor;
Expand Down Expand Up @@ -130,7 +129,9 @@ > EncryptItem(
);
return _ExternBase___default.CreateEncryptItemSuccess(dafnyOutput);
} catch (Exception ex) {
return _ExternBase___default.CreateEncryptItemFailure(Error.create_Opaque(ex));
return _ExternBase___default.CreateEncryptItemFailure(
Error.create_Opaque(ex)
);
}
}

Expand Down Expand Up @@ -183,7 +184,9 @@ > DecryptItem(
);
return _ExternBase___default.CreateDecryptItemSuccess(dafnyOutput);
} catch (Exception ex) {
return _ExternBase___default.CreateDecryptItemFailure(Error.create_Opaque(ex));
return _ExternBase___default.CreateDecryptItemFailure(
Error.create_Opaque(ex)
);
}
}

Expand All @@ -192,7 +195,9 @@ public static Result<Option<InternalLegacyOverride>, Error> Build(
) {
// Check for early return (Postcondition): If there is no legacyOverride there is nothing to do.
if (encryptorConfig.dtor_legacyOverride().is_None()) {
return _ExternBase___default.CreateBuildSuccess(_ExternBase___default.CreateInternalLegacyOverrideNone());
return _ExternBase___default.CreateBuildSuccess(
_ExternBase___default.CreateInternalLegacyOverrideNone()
);
}
final software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.LegacyOverride legacyOverride =
encryptorConfig.dtor_legacyOverride().dtor_value();
Expand All @@ -212,7 +217,9 @@ public static Result<Option<InternalLegacyOverride>, Error> Build(
final InternalResult<EncryptionContext, Error> maybeEncryptionContext =
legacyEncryptionContext(encryptorConfig);
if (maybeEncryptionContext.isFailure()) {
return _ExternBase___default.CreateBuildFailure(maybeEncryptionContext.error());
return _ExternBase___default.CreateBuildFailure(
maybeEncryptionContext.error()
);
}
// Precondition: All actions MUST be supported types
final InternalResult<
Expand All @@ -222,7 +229,9 @@ public static Result<Option<InternalLegacyOverride>, Error> Build(
legacyOverride.dtor_attributeActionsOnEncrypt()
);
if (maybeActions.isFailure()) {
return _ExternBase___default.CreateBuildFailure(maybeEncryptionContext.error());
return _ExternBase___default.CreateBuildFailure(
maybeEncryptionContext.error()
);
}

final InternalLegacyOverride internalLegacyOverride =
Expand All @@ -234,7 +243,9 @@ public static Result<Option<InternalLegacyOverride>, Error> Build(
);

return _ExternBase___default.CreateBuildSuccess(
_ExternBase___default.CreateInternalLegacyOverrideSome(internalLegacyOverride)
_ExternBase___default.CreateInternalLegacyOverrideSome(
internalLegacyOverride
)
);
}

Expand Down

0 comments on commit 8243595

Please sign in to comment.