@@ -120,7 +120,7 @@ private Map<Class, AddFilterAdaptor> getAddFilters(
120
120
for (KubernetesReconcilerWatch watch : watches .value ()) {
121
121
for (Method method : reconciler .getClass ().getMethods ()) {
122
122
AddWatchEventFilter annotation = method .getAnnotation (AddWatchEventFilter .class );
123
- if (watch .apiTypeClass ().equals (annotation .apiTypeClass ())) {
123
+ if (annotation != null && watch .apiTypeClass ().equals (annotation .apiTypeClass ())) {
124
124
if (filters .containsKey (watch .apiTypeClass ())) {
125
125
log .warn (
126
126
"Duplicated watch ADD event filter upon apiType {}" , annotation .apiTypeClass ());
@@ -146,7 +146,7 @@ private Map<Class, UpdateFilterAdaptor> getUpdateFilters(
146
146
for (KubernetesReconcilerWatch watch : watches .value ()) {
147
147
for (Method method : reconciler .getClass ().getMethods ()) {
148
148
UpdateWatchEventFilter annotation = method .getAnnotation (UpdateWatchEventFilter .class );
149
- if (watch .apiTypeClass ().equals (annotation .apiTypeClass ())) {
149
+ if (annotation != null && watch .apiTypeClass ().equals (annotation .apiTypeClass ())) {
150
150
if (filters .containsKey (watch .apiTypeClass ())) {
151
151
log .warn (
152
152
"Duplicated watch UPDATE event filter upon apiType {}" , annotation .apiTypeClass ());
@@ -173,7 +173,7 @@ private Map<Class, DeleteFilterAdaptor> getDeleteFilters(
173
173
for (KubernetesReconcilerWatch watch : watches .value ()) {
174
174
for (Method method : reconciler .getClass ().getMethods ()) {
175
175
DeleteWatchEventFilter annotation = method .getAnnotation (DeleteWatchEventFilter .class );
176
- if (watch .apiTypeClass ().equals (annotation .apiTypeClass ())) {
176
+ if (annotation != null && watch .apiTypeClass ().equals (annotation .apiTypeClass ())) {
177
177
if (filters .containsKey (watch .apiTypeClass ())) {
178
178
log .warn (
179
179
"Duplicated watch DELETE event filter upon apiType {}" , annotation .apiTypeClass ());
0 commit comments