Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential NPE when deploying on Kubernetes / Openshift #409

Closed
snowdrop-bot opened this issue Sep 2, 2021 · 0 comments
Closed

Potential NPE when deploying on Kubernetes / Openshift #409

snowdrop-bot opened this issue Sep 2, 2021 · 0 comments
Assignees
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository

Comments

@snowdrop-bot
Copy link
Collaborator

Describe the bug

The method below may return null, when adapt fails.

    private static OpenShiftClient toOpenshiftClient(KubernetesClient client) {
        try {
            return client.adapt(OpenShiftClient.class);
        } catch (KubernetesClientException e) {
            KubernetesClientErrorHandler.handle(e);
            return null; // will never happen
        }
    }

So, what is supposed to never happen actually does.

Expected behavior

handle() should always throw an Exception

Actual behavior

handle() only throws SSL related exception Exception

How to Reproduce?

Just create an app add the quarkus-openshift extension and run mvn -Dquarkus.kubernetes.deploy=true against an unreachable cluster.

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response


quarkusio#19870


$upstream:19870$

@snowdrop-bot snowdrop-bot added the upstream/closed The issue has been closed in the upstream repository label Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository
Projects
None yet
Development

No branches or pull requests

2 participants