Skip to content

Commit 93b544f

Browse files
committed
feat: inform users that controllers must be annotated with @controller
1 parent 6e97452 commit 93b544f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

operator-framework-quarkus-extension/deployment/src/main/java/io/javaoperatorsdk/quarkus/extension/deployment/QuarkusExtensionProcessor.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,13 @@ private ControllerConfiguration createControllerConfiguration(
139139

140140
// generate configuration
141141
final var controllerAnnotation = info.classAnnotation(CONTROLLER);
142+
if (controllerAnnotation == null) {
143+
throw new IllegalArgumentException(
144+
resourceControllerClassName
145+
+ " is missing the "
146+
+ Controller.class.getCanonicalName()
147+
+ " annotation");
148+
}
142149
final var crdName =
143150
valueOrDefault(
144151
controllerAnnotation, "crdName", AnnotationValue::asString, EXCEPTION_SUPPLIER);

0 commit comments

Comments
 (0)