diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/BaseOperation.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/BaseOperation.java index d1b4516ac4..7cac6889ba 100755 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/BaseOperation.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/BaseOperation.java @@ -177,9 +177,6 @@ private L listRequestHelper(URL url) { throw KubernetesClientException.launderThrowable(forOperationType("list"), e); } - // catch (InterruptedException | ExecutionException | IOException e) { - // throw KubernetesClientException.launderThrowable(forOperationType("list"), e); - // } } @@ -243,34 +240,14 @@ public T getMandatory() { try { URL requestUrl = getCompleteResourceUrl(); return handleGet(requestUrl); - } catch (KubernetesClientException e) { - throw KubernetesClientException.launderThrowable(forOperationType("get"), e); - //if (e.getCode() != HttpURLConnection.HTTP_NOT_FOUND) { - // throw e; - //} else { - // String resourceType = type != null ? type.getSimpleName() : "Resource"; - // String msg = resourceType + " with name: [" + getName() + "] not found in namespace: [" + (Utils.isNotNullOrEmpty(getNamespace()) ? getName() : getConfig().getNamespace()) + "]"; -<<<<<<< HEAD - // throw new KubernetesClientException(msg, HttpURLConnection.HTTP_NOT_FOUND, new StatusBuilder().withCode(HttpURLConnection.HTTP_NOT_FOUND).withMessage(msg).build()); - // } - } catch (InterruptedException | ExecutionException | IOException e) { -======= - // throw new KubernetesClientException(msg, HttpURLConnection.HTTP_NOT_FOUND, new StatusBuilder().withCode(HttpURLConnection.HTTP_NOT_FOUND).withMessage(msg).build()); - // } } catch (InterruptedException ie) { Thread.currentThread().interrupt(); throw KubernetesClientException.launderThrowable(forOperationType("get"), ie); } catch (ExecutionException | IOException e) { ->>>>>>> ed84e0375... Refactoring multi-catch blocks, and the InterruptedExceptions, ExecutionException, IOException in the BaseOperation.java throw KubernetesClientException.launderThrowable(forOperationType("get"), e); } } - //catch (InterruptedException | ExecutionException | IOException e) { - //throw KubernetesClientException.launderThrowable(forOperationType("get"), e); - //} - - public RootPaths getRootPaths() { try { URL requestUrl = new URL(config.getMasterUrl()); @@ -281,17 +258,12 @@ public RootPaths getRootPaths() { throw e; } return null; - } catch (InterruptedException ie) { + } catch (InterruptedException ie) { Thread.currentThread().interrupt(); throw KubernetesClientException.launderThrowable(ie); } catch (ExecutionException | IOException e) { throw KubernetesClientException.launderThrowable(e); } - - - // catch (InterruptedException | ExecutionException | IOException e) { - //throw KubernetesClientException.launderThrowable(e); - //} } @Override @@ -381,9 +353,6 @@ public T create(T... resources) throws KubernetesClientException { throw KubernetesClientException.launderThrowable(forOperationType("create"), e); } - // catch (InterruptedException | ExecutionException | IOException e) { - // throw KubernetesClientException.launderThrowable(forOperationType("create"), e); - // } } @Override @@ -401,9 +370,6 @@ public T create(T resource) { throw KubernetesClientException.launderThrowable(forOperationType("create"), e); } - // catch (InterruptedException | ExecutionException | IOException e) { - // throw KubernetesClientException.launderThrowable(forOperationType("create"), e); - // } } @Override @@ -795,10 +761,6 @@ public T updateStatus(T item) { throw KubernetesClientException.launderThrowable(forOperationType("statusUpdate"), e); } - - // catch (InterruptedException | ExecutionException | IOException e) { - // throw KubernetesClientException.launderThrowable(forOperationType("statusUpdate"), e); - // } } public BaseOperation withItem(T item) { @@ -955,9 +917,6 @@ protected Scale handleScale(Scale scaleParam) { throw KubernetesClientException.launderThrowable(forOperationType("scale"), e); } - // catch (InterruptedException | ExecutionException | IOException e) { - // throw KubernetesClientException.launderThrowable(forOperationType("scale"), e); - // } } protected Status handleDeploymentRollback(DeploymentRollback deploymentRollback) { @@ -970,9 +929,6 @@ protected Status handleDeploymentRollback(DeploymentRollback deploymentRollback) throw KubernetesClientException.launderThrowable(forOperationType("rollback"), e); } - // catch (InterruptedException | ExecutionException | IOException e) { - // throw KubernetesClientException.launderThrowable(forOperationType("rollback"), e); - // } } protected T handleGet(URL resourceUrl) throws InterruptedException, ExecutionException, IOException {