We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 67092cf + bca0cc5 commit a3d1aa8Copy full SHA for a3d1aa8
operator-framework-core/src/main/java/io/javaoperatorsdk/operator/CustomResourceUtils.java
@@ -15,11 +15,7 @@ public abstract class CustomResourceUtils {
15
* @throws OperatorException when the Custom Resource has validation error
16
*/
17
public static void assertCustomResource(Class<?> resClass, CustomResourceDefinition crd) {
18
- var namespaced =
19
- Arrays.stream(resClass.getInterfaces())
20
- .filter(classInterface -> classInterface.equals(Namespaced.class))
21
- .findAny()
22
- .isPresent();
+ var namespaced = Arrays.asList(resClass.getInterfaces()).contains(Namespaced.class);
23
24
if (!namespaced && Namespaced.class.getSimpleName().equals(crd.getSpec().getScope())) {
25
throw new OperatorException(
0 commit comments