Skip to content

Commit a93eeff

Browse files
committed
Prevent more than 64 QIs to be used
1 parent 89d5e19 commit a93eeff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/org/deidentifier/arx/ARXAnonymizer.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,12 @@ private void checkBeforeEncoding(final DataHandle handle, final ARXConfiguration
419419
}
420420
}
421421

422+
// Check if more than 64 QIs
423+
int _numQIs = handle.getDefinition().getQuasiIdentifyingAttributes().size();
424+
if (_numQIs > 64) {
425+
throw new IllegalArgumentException("No more than 64 quasi-identifying variables are supported (specified: " + _numQIs + ")");
426+
}
427+
422428
// Check response variables
423429
if (config.getQualityModel() instanceof MetricSDClassification) {
424430
if (handle.getDefinition().getResponseVariables().isEmpty()) {
@@ -431,6 +437,7 @@ private void checkBeforeEncoding(final DataHandle handle, final ARXConfiguration
431437
}
432438
}
433439

440+
// Check sensitive variables
434441
for (String attr : handle.getDefinition().getSensitiveAttributes()){
435442
boolean found = false;
436443
for (LDiversity c : config.getPrivacyModels(LDiversity.class)) {

0 commit comments

Comments
 (0)