From 6f5f5e77ef25e4d4951b1cf16a7300ff19ea16b8 Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Mon, 30 Mar 2026 07:52:36 +0000
Subject: [PATCH] Apply suggestions from code review
---
opendj-server-legacy/src/main/java/org/opends/server/plugins/ReferentialIntegrityPlugin.java | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/plugins/ReferentialIntegrityPlugin.java b/opendj-server-legacy/src/main/java/org/opends/server/plugins/ReferentialIntegrityPlugin.java
index 7fe3553..53852eb 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/plugins/ReferentialIntegrityPlugin.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/plugins/ReferentialIntegrityPlugin.java
@@ -1015,6 +1015,27 @@
Attribute modifiedAttribute = mod.getAttribute();
if (modifiedAttribute != null && !modifiedAttribute.isEmpty())
{
+ // Only enforce referential integrity on attributes that this plugin is configured to manage.
+ final AttributeType modifiedAttrType = modifiedAttribute.getAttributeType();
+ boolean isManagedAttributeType = false;
+ if (modifiedAttrType != null && attributeTypes != null)
+ {
+ for (AttributeType configuredType : attributeTypes)
+ {
+ if (modifiedAttrType.equals(configuredType)
+ || modifiedAttrType.isSubTypeOf(configuredType))
+ {
+ isManagedAttributeType = true;
+ break;
+ }
+ }
+ }
+
+ if (!isManagedAttributeType)
+ {
+ // Skip integrity checks for attributes not configured for this plugin.
+ continue;
+ }
PluginResult.PreOperation result =
isIntegrityMaintained(modifiedAttribute, entryDN, entryBaseDN);
if (result.getResultCode() != ResultCode.SUCCESS)
--
Gitblit v1.10.0