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

ProjectsApi.getProjects fails with com.google.gson.JsonArray cannot be cast to class com.google.gson.JsonObject #12

Open
memleak00 opened this issue Apr 7, 2023 · 1 comment

Comments

@memleak00
Copy link

Versions 10.0.0 to 12.0.0

ProjectsApi projectsApi = new ProjectsApi(...)
Projects result = projectsApi.getProjects(null, 0L, null, null);

Caused by: java.lang.ClassCastException: class com.google.gson.JsonArray cannot be cast to class com.google.gson.JsonObject (com.google.gson.JsonArray and com.google.gson.JsonObject are in unnamed module of loader 'app') at com.google.gson.JsonObject.getAsJsonObject(JsonObject.java:191) at com.launchdarkly.api.model.Project.validateJsonObject(Project.java:442) at com.launchdarkly.api.model.Projects.validateJsonObject(Projects.java:278) at com.launchdarkly.api.model.Projects$CustomTypeAdapterFactory$1.read(Projects.java:321) at com.launchdarkly.api.model.Projects$CustomTypeAdapterFactory$1.read(Projects.java:294) at com.google.gson.TypeAdapter$1.read(TypeAdapter.java:199) at com.google.gson.Gson.fromJson(Gson.java:1058) at com.google.gson.Gson.fromJson(Gson.java:1016) at com.google.gson.Gson.fromJson(Gson.java:959) at com.launchdarkly.api.JSON.deserialize(JSON.java:423) at com.launchdarkly.api.ApiClient.deserialize(ApiClient.java:847) at com.launchdarkly.api.ApiClient.handleResponse(ApiClient.java:1055) at com.launchdarkly.api.ApiClient.execute(ApiClient.java:979) at com.launchdarkly.api.api.ProjectsApi.getProjectsWithHttpInfo(ProjectsApi.java:519) at com.launchdarkly.api.api.ProjectsApi.getProjects(ProjectsApi.java:493)

@lucywyman
Copy link

Oh ruuuuuude - thank you for raising this! Hopefully we can get to it next week and get a bug fix out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants