public static UnaryOperator overrideEncryptionContextTableName()

in sdk1/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/encryption/utils/EncryptionContextOperators.java [42:59]


  public static UnaryOperator<EncryptionContext> overrideEncryptionContextTableName(
      String originalTableName, String currentTableName) {
    return encryptionContext -> {
      if (encryptionContext == null
          || encryptionContext.getTableName() == null
          || originalTableName == null
          || currentTableName == null) {
        return encryptionContext;
      }
      if (originalTableName.equals(encryptionContext.getTableName())) {
        return new EncryptionContext.Builder(encryptionContext)
            .withTableName(currentTableName)
            .build();
      } else {
        return encryptionContext;
      }
    };
  }