The target client type.
diff --git a/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/extension/SupportTestingClient.java b/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/extension/SupportTestingClient.java
deleted file mode 100644
index d66a74626ae..00000000000
--- a/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/extension/SupportTestingClient.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2015 Red Hat, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.fabric8.kubernetes.client.extension;
-
-import io.fabric8.kubernetes.client.Client;
-
-/**
- * Marks the client as being able to test for its own support.
- *
- * Moving forward only clients with special support needs, such as
- * the openshift client should implement this interface. For those classes,
- * this interface can be part of the public contract.
- *
- * @deprecated will be removed in future versions
- */
-@Deprecated
-public interface SupportTestingClient extends Client {
-
- /**
- * Tests if the client is supported.
- *
- * Implementations will use
- * {@link Client#hasApiGroup(String, boolean)} to be compatible with mock support
- *
- * @return true if supported
- *
- * @deprecated use {@link Client#supports(Class)} or {@link Client#supports(String, String)} instead
- */
- @Deprecated
- boolean isSupported();
-
-}
diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/impl/BaseClient.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/impl/BaseClient.java
index 45b0da8550e..fa29f1016ff 100644
--- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/impl/BaseClient.java
+++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/impl/BaseClient.java
@@ -36,7 +36,6 @@
import io.fabric8.kubernetes.client.dsl.internal.OperationContext;
import io.fabric8.kubernetes.client.dsl.internal.OperationSupport;
import io.fabric8.kubernetes.client.extension.ExtensionAdapter;
-import io.fabric8.kubernetes.client.extension.SupportTestingClient;
import io.fabric8.kubernetes.client.http.HttpClient;
import io.fabric8.kubernetes.client.utils.ApiVersionUtil;
import io.fabric8.kubernetes.client.utils.KubernetesSerialization;
@@ -219,12 +218,7 @@ public boolean hasApiGroup(String apiGroup, boolean exact) {
@Override
public Boolean isAdaptable(Class type) {
- // if type is an instanceof SupportTestingClient, then it's a proper
- // test, otherwise it could be legacy support on an extension client
- C toTest = adapt(type);
- if (toTest instanceof SupportTestingClient) {
- return ((SupportTestingClient) toTest).isSupported();
- }
+ adapt(type);
return true;
}
diff --git a/kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/KubernetesMockServerTest.java b/kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/KubernetesMockServerTest.java
index caf91df33f4..3a2f21369fd 100644
--- a/kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/KubernetesMockServerTest.java
+++ b/kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/KubernetesMockServerTest.java
@@ -62,12 +62,12 @@ void testReset() {
@Test
void testOpenShiftSupport() {
server.setUnsupported("openshift.io");
- assertFalse(client.isAdaptable(OpenShiftClient.class));
- assertFalse(client.adapt(OpenShiftClient.class).isSupported());
+ assertTrue(client.isAdaptable(OpenShiftClient.class));
assertFalse(client.supports(Route.class));
assertTrue(client.supports(Pod.class));
server.reset();
- assertTrue(client.adapt(OpenShiftClient.class).isSupported());
+ assertTrue(client.isAdaptable(OpenShiftClient.class));
+ assertTrue(client.supports(Route.class));
}
@Version("v1")
diff --git a/openshift-client-api/src/main/java/io/fabric8/openshift/client/NamespacedOpenShiftClientAdapter.java b/openshift-client-api/src/main/java/io/fabric8/openshift/client/NamespacedOpenShiftClientAdapter.java
index d679c499a04..60ef524c573 100644
--- a/openshift-client-api/src/main/java/io/fabric8/openshift/client/NamespacedOpenShiftClientAdapter.java
+++ b/openshift-client-api/src/main/java/io/fabric8/openshift/client/NamespacedOpenShiftClientAdapter.java
@@ -512,11 +512,6 @@ public NonNamespaceOperation