There is an isEmpty() method available in Map interface. We should rather use it rather than doing explicit size check. It would improve readability.
Expected Behavior
ret.size() > 0 is replaced with !ret.isEmpty()
Acceptance Criteria
[x] ret.size() > 0is replaced with!ret.isEmpty()`
[x] Project compiles cleanly after making changes
Before you start :red_circle:
:point_down: :point_down: :point_down: :point_down: :point_down: :point_down: :point_down: :point_down: :point_down: :point_down::point_down::point_down::point_down::point_down::point_down::point_down:
Make sure you read the contributing guide first. Pay special attention to the ECA agreement section and the requirement to sign-off your commit.
How to manually test my changes
Kubernetes
If you don't have a real Kubernetes cluster available (most probably), you can use Minikube or Kind to test with a local cluster.
Once you have your Sandbox environment, you'll need to download the oc tool from the cluster console.
(Press the ? icon and from the context menu select Command line tools, you'll be redirected to https://$subdomain.openshiftapps.com/command-lines-tools where you'll be able to download the CLI for your platform)
Component
JKube Kit
Task description
Description
In EnvUtil, we have check size of the Map before returning it https://github.com/eclipse/jkube/blob/c4ee9d4e9432297c50d9385a8c06d1fea0f75e3a/jkube-kit/common/src/main/java/org/eclipse/jkube/kit/common/util/EnvUtil.java#L265
There is an
isEmpty()
method available in Map interface. We should rather use it rather than doing explicit size check. It would improve readability.Expected Behavior
ret.size() > 0
is replaced with!ret.isEmpty()
Acceptance Criteria
is replaced with
!ret.isEmpty()`Before you start :red_circle:
:point_down: :point_down: :point_down: :point_down: :point_down: :point_down: :point_down: :point_down: :point_down: :point_down::point_down::point_down::point_down::point_down::point_down::point_down: Make sure you read the contributing guide first. Pay special attention to the ECA agreement section and the requirement to sign-off your commit.
How to manually test my changes
Kubernetes
If you don't have a real Kubernetes cluster available (most probably), you can use Minikube or Kind to test with a local cluster.
OpenShift
If you don't have a real OpenShift cluster available (most probably), you can use Red Hat's developer Sandbox for Red Hat OpenShift. The only requirement is to have a Red Hat account.
Once you have your Sandbox environment, you'll need to download the oc tool from the cluster console. (Press the
?
icon and from the context menu selectCommand line tools
, you'll be redirected to https://$subdomain.openshiftapps.com/command-lines-tools where you'll be able to download the CLI for your platform)