@@ -145,46 +145,45 @@ public InformerConfigHolder<R> buildForInformerEventSource() {
145
145
@ SuppressWarnings ({"unchecked" })
146
146
public InformerConfigHolder <R >.Builder initFromAnnotation (InformerConfig informerConfig ,
147
147
String context ) {
148
- final var config = InformerConfigHolder .builder ();
149
148
if (informerConfig != null ) {
150
149
151
150
// override default name if more specific one is provided
152
151
if (!Constants .NO_VALUE_SET .equals (informerConfig .name ())) {
153
- config . withName (informerConfig .name ());
152
+ withName (informerConfig .name ());
154
153
}
155
154
156
155
var namespaces = Set .of (informerConfig .namespaces ());
157
- config . withNamespaces (namespaces );
156
+ withNamespaces (namespaces );
158
157
159
158
final var fromAnnotation = informerConfig .labelSelector ();
160
159
var labelSelector = Constants .NO_VALUE_SET .equals (fromAnnotation ) ? null : fromAnnotation ;
161
- config . withLabelSelector (labelSelector );
160
+ withLabelSelector (labelSelector );
162
161
163
- config . withOnAddFilter (Utils .instantiate (informerConfig .onAddFilter (),
162
+ withOnAddFilter (Utils .instantiate (informerConfig .onAddFilter (),
164
163
OnAddFilter .class , context ));
165
164
166
- config . withOnUpdateFilter (Utils .instantiate (informerConfig .onUpdateFilter (),
165
+ withOnUpdateFilter (Utils .instantiate (informerConfig .onUpdateFilter (),
167
166
OnUpdateFilter .class , context ));
168
167
169
- config . withOnDeleteFilter (Utils .instantiate (informerConfig .onDeleteFilter (),
168
+ withOnDeleteFilter (Utils .instantiate (informerConfig .onDeleteFilter (),
170
169
OnDeleteFilter .class , context ));
171
170
172
- config . withGenericFilter (Utils .instantiate (informerConfig .genericFilter (),
171
+ withGenericFilter (Utils .instantiate (informerConfig .genericFilter (),
173
172
GenericFilter .class ,
174
173
context ));
175
174
176
- config . withFollowControllerNamespacesOnChange (
175
+ withFollowControllerNamespacesOnChange (
177
176
informerConfig .followControllerNamespacesOnChange ());
178
177
179
- config . withItemStore (Utils .instantiate (informerConfig .itemStore (),
178
+ withItemStore (Utils .instantiate (informerConfig .itemStore (),
180
179
ItemStore .class , context ));
181
180
182
181
final var informerListLimitValue = informerConfig .informerListLimit ();
183
182
final var informerListLimit =
184
183
informerListLimitValue == Constants .NO_LONG_VALUE_SET ? null : informerListLimitValue ;
185
- config . withInformerListLimit (informerListLimit );
184
+ withInformerListLimit (informerListLimit );
186
185
}
187
- return ( InformerConfigHolder < R >. Builder ) config ;
186
+ return this ;
188
187
}
189
188
190
189
public Builder withName (String name ) {
0 commit comments