Skip to content

Commit 56628df

Browse files
committed
refactor: clearly mark optional argument
1 parent d67c840 commit 56628df

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

util/src/main/java/io/kubernetes/client/Metrics.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import io.kubernetes.client.util.generic.GenericKubernetesApi;
2323
import io.kubernetes.client.util.generic.options.ListOptions;
2424

25+
import javax.annotation.Nullable;
26+
2527
public class Metrics {
2628
private static final String API_GROUP = "metrics.k8s.io";
2729
private static final String API_VERSION = "v1beta1";
@@ -85,7 +87,7 @@ public PodMetricsList getPodMetrics(String namespace) throws ApiException {
8587
* @return PodMetricList, never null.
8688
* @throws ApiException If the ApiClient cannot complete the request.
8789
*/
88-
public PodMetricsList getPodMetrics(String namespace, String labelSelector) throws ApiException {
90+
public PodMetricsList getPodMetrics(String namespace, @Nullable String labelSelector) throws ApiException {
8991
GenericKubernetesApi<PodMetrics, PodMetricsList> metricsClient =
9092
new GenericKubernetesApi<>(
9193
PodMetrics.class, PodMetricsList.class, Metrics.API_GROUP, Metrics.API_VERSION, Metrics.PODS, apiClient);

0 commit comments

Comments
 (0)