Skip to content

Example code to list all pods results in Java error in IntelliJ #2761

@Simpson99091

Description

@Simpson99091

Describe the bug
Example code to list all pods results in Java error in IntelliJ.

Client Version
15.0.1

Kubernetes Version
n/a

Java Version
Java 11

To Reproduce

  1. Start a new maven project in IntelliJ. Include dependency in POM:
<dependency>
    <groupId>io.kubernetes</groupId>
    <artifactId>client-java</artifactId>
    <version>15.0.1</version>
</dependency>
  1. Copy the example code from https://github.com/kubernetes-client/java/wiki/3.-Code-Examples "list all pods:" into a new Java class.

Expected behavior
I expected to be able to compile the example code from https://github.com/kubernetes-client/java/wiki/3.-Code-Examples to list all pods and run it. However, the IDE reports this as an error.

listPodForAllNamespaces(java.lang.Boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.Integer, java.lang.String, java.lang.String, ...)' in 'io.kubernetes.client.openapi.apis.CoreV1Api' cannot be applied to '(null, null, null, null, null, null, null, null, null)

Note: I was able to get it to work by adding an extra "null" to the parameter list! But I'm not able to edit the Wiki.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions