Skip to content

Commit 1c00c27

Browse files
committed
CDM-22 switching to isEnabled() wrapper
1 parent dc3e3d2 commit 1c00c27

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/datastax/astra/migrate/cql/CqlHelper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public boolean initialize() {
6666
for (Featureset f : Featureset.values()) {
6767
if (f.toString().startsWith("TEST_")) continue; // Skip test features
6868
Feature feature = getFeature(f);
69-
if (null!=feature && feature.isEnabled())
69+
if (isFeatureEnabled(f))
7070
feature.alterProperties(this.propertyHelper);
7171
}
7272

@@ -192,14 +192,14 @@ private String cqlTargetInsert() {
192192
}
193193
}
194194

195-
if (featureMap.get(Featureset.CONSTANT_COLUMNS).isEnabled()) {
195+
if (isFeatureEnabled(Featureset.CONSTANT_COLUMNS)) {
196196
insertBinds += "," + featureMap.get(Featureset.CONSTANT_COLUMNS).getAsString(ConstantColumns.Property.COLUMN_VALUES);
197197
}
198198

199199
targetInsertQuery = "INSERT INTO " +
200200
getTargetKeyspaceTable() +
201201
" (" + propertyHelper.getAsString(KnownProperties.TARGET_COLUMN_NAMES) +
202-
((featureMap.get(Featureset.CONSTANT_COLUMNS).isEnabled()) ? "," + featureMap.get(Featureset.CONSTANT_COLUMNS).getAsString(ConstantColumns.Property.COLUMN_NAMES) : "") +
202+
(isFeatureEnabled(Featureset.CONSTANT_COLUMNS) ? "," + featureMap.get(Featureset.CONSTANT_COLUMNS).getAsString(ConstantColumns.Property.COLUMN_NAMES) : "") +
203203
") VALUES (" + insertBinds + ")";
204204
if (null != getTtlCols() && !getTtlCols().isEmpty()) {
205205
targetInsertQuery += " USING TTL ?";

0 commit comments

Comments
 (0)