File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed
operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 22
33import java .util .Set ;
44
5+ import static io .javaoperatorsdk .operator .api .reconciler .Constants .DEFAULT_NAMESPACES ;
6+
57public interface NamespaceChangeable {
68
79 /**
@@ -16,7 +18,7 @@ public interface NamespaceChangeable {
1618
1719 default void changeNamespaces (String ... namespaces ) {
1820 changeNamespaces (
19- namespaces != null ? Set .of (namespaces ) : ResourceConfiguration . DEFAULT_NAMESPACES );
21+ namespaces != null ? Set .of (namespaces ) : DEFAULT_NAMESPACES );
2022 }
2123
2224 default boolean allowsNamespaceChanges () {
Original file line number Diff line number Diff line change 1010import io .javaoperatorsdk .operator .processing .event .source .SecondaryToPrimaryMapper ;
1111import io .javaoperatorsdk .operator .processing .event .source .informer .Mappers ;
1212
13+ import static io .javaoperatorsdk .operator .api .reconciler .Constants .DEFAULT_NAMESPACES ;
14+
1315public interface InformerConfiguration <R extends HasMetadata >
1416 extends ResourceConfiguration <R > {
1517
@@ -71,7 +73,7 @@ public InformerConfigurationBuilder<R> withSecondaryToPrimaryMapper(
7173
7274 public InformerConfigurationBuilder <R > withNamespaces (String ... namespaces ) {
7375 return withNamespaces (
74- namespaces != null ? Set .of (namespaces ) : ResourceConfiguration . DEFAULT_NAMESPACES );
76+ namespaces != null ? Set .of (namespaces ) : DEFAULT_NAMESPACES );
7577 }
7678
7779 public InformerConfigurationBuilder <R > withNamespaces (Set <String > namespaces ) {
@@ -90,7 +92,7 @@ public InformerConfigurationBuilder<R> withNamespaces(Set<String> namespaces) {
9092 */
9193 public InformerConfigurationBuilder <R > withNamespaces (Set <String > namespaces ,
9294 boolean followChanges ) {
93- this .namespaces = namespaces != null ? namespaces : ResourceConfiguration . DEFAULT_NAMESPACES ;
95+ this .namespaces = namespaces != null ? namespaces : DEFAULT_NAMESPACES ;
9496 this .inheritControllerNamespacesOnChange = true ;
9597 return this ;
9698 }
Original file line number Diff line number Diff line change 11package io .javaoperatorsdk .operator .api .reconciler ;
22
3+ import java .util .Collections ;
34import java .util .Set ;
45
56public final class Constants {
67
7- public static final Set <String > DEFAULT_NAMESPACES = Set .of (Constants .WATCH_ALL_NAMESPACES );
8+ public static final Set <String > DEFAULT_NAMESPACES =
9+ Collections .singleton (Constants .WATCH_ALL_NAMESPACES );
810 public static final Set <String > WATCH_CURRENT_NAMESPACE_SET =
9- Set . of (Constants .WATCH_CURRENT_NAMESPACE );
11+ Collections . singleton (Constants .WATCH_CURRENT_NAMESPACE );
1012
1113 public static final String NO_VALUE_SET = "" ;
1214 public static final String WATCH_CURRENT_NAMESPACE = "JOSDK_WATCH_CURRENT" ;
You can’t perform that action at this time.
0 commit comments