Skip to content

Commit

Permalink
addressing code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins committed Jun 26, 2021
1 parent 70206c1 commit 5716562
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@

public interface Waitable<T, P> {

/**
* @deprecated no longer used
*/
@Deprecated
long DEFAULT_INITIAL_BACKOFF_MILLIS = 5L;
/**
* @deprecated no longer used
*/
@Deprecated
double DEFAULT_BACKOFF_MULTIPLIER = 2d;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1161,9 +1161,9 @@ public void onDelete(T obj, boolean deletedFinalStateUnknown) {
} catch (ExecutionException e) {
throw KubernetesClientException.launderThrowable(e.getCause());
} catch (TimeoutException e) {
T item = getItem();
if (item != null) {
throw new KubernetesClientTimeoutException(item, amount, timeUnit);
T i = getItem();
if (i != null) {
throw new KubernetesClientTimeoutException(i, amount, timeUnit);
}
throw new KubernetesClientTimeoutException(getKind(), getName(), getNamespace(), amount, timeUnit);
}
Expand Down Expand Up @@ -1201,8 +1201,8 @@ public SharedIndexInformer<T> inform(ResourceEventHandler<T> handler, long resyn
}

private DefaultSharedIndexInformer<T, L> createInformer(long resync, Consumer<L> onList, ResourceEventHandler<T> handler) {
T item = getItem();
String name = (Utils.isNotNullOrEmpty(getName()) || item != null) ? checkName(item) : null;
T i = getItem();
String name = (Utils.isNotNullOrEmpty(getName()) || i != null) ? checkName(i) : null;

// use the local context / namespace
DefaultSharedIndexInformer<T, L> informer = new DefaultSharedIndexInformer<>(getType(), new ListerWatcher<T, L>() {
Expand Down

0 comments on commit 5716562

Please sign in to comment.