Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFCORE-7141] Removed deprecated Attachments.ADDITIONAL_ANNOTATION_IN… #6323

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,6 @@ public final class Attachments {
*/
public static final AttachmentKey<AttachmentList<String>> ADDITIONAL_INDEX_MODULES = AttachmentKey.createList(String.class);

/**
* Annotation indices, keyed by the identifier of the module from which they were obtained.
*
* @deprecated use {@link #ADDITIONAL_ANNOTATION_INDEXES_BY_MODULE_NAME}
*/
@Deprecated(forRemoval = true)
public static final AttachmentKey<Map<ModuleIdentifier, CompositeIndex>> ADDITIONAL_ANNOTATION_INDEXES_BY_MODULE = AttachmentKey.create(Map.class);

/**
* Annotation indices, keyed by the canonical name module from which they were obtained.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,6 @@ public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitPro
}
}
deploymentUnit.putAttachment(Attachments.ADDITIONAL_ANNOTATION_INDEXES_BY_MODULE_NAME, Collections.unmodifiableMap(additionalAnnotationIndexes));
// For compatibility attach an additional map keyed by ModuleIdentifier. TODO remove this key and stop doing this.
Map<ModuleIdentifier, CompositeIndex> additionalIndexesByModId = new HashMap<>(additionalAnnotationIndexes.size());
for (Map.Entry<String, CompositeIndex> entry : additionalAnnotationIndexes.entrySet()) {
additionalIndexesByModId.put(ModuleIdentifier.fromString(entry.getKey()), entry.getValue());
}
deploymentUnit.putAttachment(Attachments.ADDITIONAL_ANNOTATION_INDEXES_BY_MODULE, additionalIndexesByModId);

final List<ResourceRoot> allResourceRoots = new ArrayList<ResourceRoot>();
final List<ResourceRoot> resourceRoots = deploymentUnit.getAttachmentList(Attachments.RESOURCE_ROOTS);
Expand Down
Loading