cloudfoundry / cloudfoundry/cf-java-client

Block returns null

Open
#1,164 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question triaged
Dominant language
Java
Stars
334
Forks
319
PR merge metrics
No merged PRs in 30d

Description

Hi guys,
I need to perform several commands synchronously and return the response, but all commands after block return 'null', for instance:
CreateServiceInstanceResponse createServiceInstanceResponse = cloudFoundryOperations.services().createInstance(serviceInstanceRequestObj).cast(CreateServiceInstanceResponse.class).block();

As I see in CF, the command blocks and waits to Service Instance creation, but at the end the 'createServiceInstanceResponse' object is null.

Is this code incorrect or this is a bug?

Thank you in advance,
Yan

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with cloudFoundryOperations.services().createInstance(...).cast(CreateServiceInstanceResponse.class).block() and trace the service-instance creation path. Reproduce the synchronous call and compare the returned value with the API's expected behavior; done means the null result is explained and the behavior is verified with an appropriate test or confirmed as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.