reference modif actions - #869
Conversation
Signed-off-by: SOUISSI Maissa (Externe) <souissimai@gm0winl878.bureau.si.interne>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesContainer resolution
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: SOUISSI Maissa (Externe) <souissimai@gm0winl878.bureau.si.interne>
Signed-off-by: SOUISSI Maissa (Externe) <souissimai@gm0winl878.bureau.si.interne>
|
Warning Your free Security trial is over. An organization admin can activate billing to continue. |
|
This comment was marked as resolved.
This comment was marked as resolved.
| * @param modificationUuid uuid of the modification-reference itself | ||
| * @param referenceId uuid of the referenced shared composite in directory-server | ||
| * @param containerId uuid of the composite containing the reference, null if the modification-reference is at the root level | ||
| * @author RTE |
| /** | ||
| * A COMPOSITE container may be designated through a modification reference: in that case the actual | ||
| * container is the shared composite the reference points to. | ||
| */ | ||
| private UUID resolveContainerId(ModificationContainerInfos containerInfos) { | ||
| if (ModificationContainerType.COMPOSITE.equals(containerInfos.type())) { | ||
| return modificationRepository.findById(containerInfos.id()) | ||
| .filter(ModificationReferenceEntity.class::isInstance) | ||
| .map(entity -> ((ModificationReferenceEntity) entity).getReferenceId()) | ||
| .orElse(containerInfos.id()); | ||
| } | ||
| return containerInfos.id(); | ||
| } |
There was a problem hiding this comment.
I don't think that this function is useful.
containerInfos.id() should never be a reference modification uuid, it should be the uuid of the real container, that is the uuid of the composite toward which the reference is pointing.
Therefore .filter(ModificationReferenceEntity.class::isInstance) should always return false. Or Something strange is in the container table.



PR Summary