Source:
public CassandraConfiguration build() { String consistencyLevelRegular = this.consistencyLevelRegular.orElse(DEFAULT_CONSISTENCY_LEVEL_REGULAR); String consistencyLevelLightweightTransaction = this.consistencyLevelLightweightTransaction.orElse(DEFAULT_CONSISTENCY_LEVEL_LIGHTWEIGHT_TRANSACTION); Predicate<String> isLocal = consistencyLevel -> consistencyLevel.startsWith("LOCAL_"); if (isLocal.test(consistencyLevelRegular) != isLocal.test(consistencyLevelLightweightTransaction)) { LOGGER.warn("The consistency levels may not be properly configured, one is local and the other not: " + "regular = '{}' and lightweight transaction = '{}'", consistencyLevelRegular, consistencyLevelLightweightTransaction); } return new CassandraConfiguration(aclMaxRetry.orElse(DEFAULT_ACL_MAX_RETRY), messageReadChunkSize.orElse(DEFAULT_MESSAGE_CHUNK_SIZE_ON_READ), expungeChunkSize.orElse(DEFAULT_EXPUNGE_BATCH_SIZE), flagsUpdateMessageIdMaxRetry.orElse(DEFAULT_FLAGS_UPDATE_MESSAGE_ID_MAX_RETRY), flagsUpdateMessageMaxRetry.orElse(DEFAULT_FLAGS_UPDATE_MESSAGE_MAX_RETRY), modSeqMaxRetry.orElse(DEFAULT_MODSEQ_MAX_RETRY), uidMaxRetry.orElse(DEFAULT_UID_MAX_RETRY), fetchNextPageInAdvanceRow.orElse(DEFAULT_FETCH_NEXT_PAGE_ADVANCE_IN_ROW), blobPartSize.orElse(DEFAULT_BLOB_PART_SIZE), attachmentV2MigrationReadTimeout.orElse(DEFAULT_ATTACHMENT_V2_MIGRATION_READ_TIMEOUT), messageAttachmentIdsReadTimeout.orElse(DEFAULT_MESSAGE_ATTACHMENT_ID_MIGRATION_READ_TIMEOUT), consistencyLevelRegular, consistencyLevelLightweightTransaction, mailboxReadRepair.orElse(DEFAULT_MAILBOX_READ_REPAIR), mailboxCountersReadRepairMax.orElse(DEFAULT_MAX_MAILBOX_COUNTERS_READ_REPAIR_CHANCE), mailboxCountersReadRepairChanceOneHundred.orElse(DEFAULT_ONE_HUNDRED_MAILBOX_COUNTERS_READ_REPAIR_CHANCE), messageReadStrongConsistency.orElse(true)); }

Target:
public CassandraConfiguration build() { String consistencyLevelRegular = this.consistencyLevelRegular.orElse(DEFAULT_CONSISTENCY_LEVEL_REGULAR); String consistencyLevelLightweightTransaction = this.consistencyLevelLightweightTransaction.orElse(DEFAULT_CONSISTENCY_LEVEL_LIGHTWEIGHT_TRANSACTION); Predicate<String> isLocal = consistencyLevel -> consistencyLevel.startsWith("LOCAL_"); if (isLocal.test(consistencyLevelRegular) != isLocal.test(consistencyLevelLightweightTransaction)) { LOGGER.warn("The consistency levels may not be properly configured, one is local and the other not: " + "regular = '{}' and lightweight transaction = '{}'", consistencyLevelRegular, consistencyLevelLightweightTransaction); } return new CassandraConfiguration(aclMaxRetry.orElse(DEFAULT_ACL_MAX_RETRY), messageReadChunkSize.orElse(DEFAULT_MESSAGE_CHUNK_SIZE_ON_READ), expungeChunkSize.orElse(DEFAULT_EXPUNGE_BATCH_SIZE), flagsUpdateMessageIdMaxRetry.orElse(DEFAULT_FLAGS_UPDATE_MESSAGE_ID_MAX_RETRY), flagsUpdateMessageMaxRetry.orElse(DEFAULT_FLAGS_UPDATE_MESSAGE_MAX_RETRY), modSeqMaxRetry.orElse(DEFAULT_MODSEQ_MAX_RETRY), uidMaxRetry.orElse(DEFAULT_UID_MAX_RETRY), fetchNextPageInAdvanceRow.orElse(DEFAULT_FETCH_NEXT_PAGE_ADVANCE_IN_ROW), blobPartSize.orElse(DEFAULT_BLOB_PART_SIZE), attachmentV2MigrationReadTimeout.orElse(DEFAULT_ATTACHMENT_V2_MIGRATION_READ_TIMEOUT), messageAttachmentIdsReadTimeout.orElse(DEFAULT_MESSAGE_ATTACHMENT_ID_MIGRATION_READ_TIMEOUT), consistencyLevelRegular, consistencyLevelLightweightTransaction, mailboxReadRepair.orElse(DEFAULT_MAILBOX_READ_REPAIR), mailboxCountersReadRepairMax.orElse(DEFAULT_MAX_MAILBOX_COUNTERS_READ_REPAIR_CHANCE), mailboxCountersReadRepairChanceOneHundred.orElse(DEFAULT_ONE_HUNDRED_MAILBOX_COUNTERS_READ_REPAIR_CHANCE), messageReadStrongConsistency.orElse(DEFAULT_STRONG_CONSISTENCY)); }