-
Notifications
You must be signed in to change notification settings - Fork 583
Open
Labels
Description
Environment Details
- Helidon Version: 4.x
- Helidon MP
Reported by @noahmonster
Problem Description
When user is advised to replace deprecated Scheduling annotations in CDI bean while having Helidon codegen active this check makes it impossible to use new scheduling annotations on a CDI bean.
private void checkTypeIsService(RegistryRoundContext roundContext, TypeInfo typeInfo) {
Optional<ClassModel.Builder> descriptor = roundContext.generatedType(ctx.descriptorType(typeInfo.typeName()));
if (descriptor.isEmpty()) {
throw new CodegenException("Type annotated with one of the scheduling annotations is not a service itself."
+ " It must be annotated with "
+ SERVICE_ANNOTATION_SINGLETON.classNameWithEnclosingNames() + ".",
typeInfo.originatingElementValue());
}
}We should apply the check only on declarative beans or ingnore CDI beans.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
High priority