Skip to content

Commit e5e8d65

Browse files
committed
ArC: BeanConfiguratorBase.startup() makes the bean unremovable
- because it's functionally equivalent to a bean that declares an observer of StartupEvent
1 parent 4a45807 commit e5e8d65

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanConfiguratorBase.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,8 @@ public THIS addInjectionPoint(Type requiredType, AnnotationInstance... requiredQ
345345
/**
346346
* Initialize the bean eagerly at application startup.
347347
* <p>
348+
* The bean also becomes {@code unremovable}.
349+
* <p>
348350
* If this bean is not active (see {@link #checkActive(Consumer)}) and is not injected into
349351
* any always active bean, eager initialization is skipped to prevent needless failures.
350352
*
@@ -353,12 +355,14 @@ public THIS addInjectionPoint(Type requiredType, AnnotationInstance... requiredQ
353355
*/
354356
public THIS startup(int priority) {
355357
this.startupPriority = priority;
356-
return self();
358+
return unremovable();
357359
}
358360

359361
/**
360362
* Initialize the bean eagerly at application startup.
361363
* <p>
364+
* The bean also becomes {@code unremovable}.
365+
* <p>
362366
* If this bean is not active (see {@link #checkActive(Consumer)}) and is not injected into
363367
* any always active bean, eager initialization is skipped to prevent needless failures.
364368
*

0 commit comments

Comments
 (0)