Skip to content

Commit 84863f3

Browse files
committed
refactor: clean-up
1 parent bdd2d96 commit 84863f3

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/AnnotationControllerConfiguration.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,16 @@ public class AnnotationControllerConfiguration<P extends HasMetadata>
4545
private static final String KUBE_DEPENDENT_NAME = KubernetesDependent.class.getSimpleName();
4646

4747
protected final Reconciler<P> reconciler;
48-
private final io.javaoperatorsdk.operator.api.reconciler.ControllerConfiguration annotation;
48+
private final ControllerConfiguration annotation;
4949
private List<DependentResourceSpec> specs;
5050
private Class<P> resourceClass;
5151

5252
public AnnotationControllerConfiguration(Reconciler<P> reconciler) {
5353
this.reconciler = reconciler;
54-
this.annotation = reconciler.getClass()
55-
.getAnnotation(io.javaoperatorsdk.operator.api.reconciler.ControllerConfiguration.class);
54+
this.annotation = reconciler.getClass().getAnnotation(ControllerConfiguration.class);
5655
if (annotation == null) {
57-
throw new OperatorException(
58-
"Missing mandatory @" + ControllerConfiguration.class.getSimpleName() +
59-
" annotation for reconciler: " + reconciler);
56+
throw new OperatorException("Missing mandatory @" + CONTROLLER_CONFIG_ANNOTATION +
57+
" annotation for reconciler: " + reconciler);
6058
}
6159
}
6260

@@ -298,7 +296,6 @@ private Object createKubernetesResourceConfig(Class<? extends DependentResource>
298296
final var fromAnnotation = kubeDependent.labelSelector();
299297
labelSelector = Constants.NO_VALUE_SET.equals(fromAnnotation) ? null : fromAnnotation;
300298

301-
302299
final var context =
303300
KUBE_DEPENDENT_NAME + " annotation on " + dependentType.getName() + " DependentResource";
304301
onAddFilter = createFilter(kubeDependent.onAddFilter(), OnAddFilter.class, context)

0 commit comments

Comments
 (0)