Skip to content

Java: Missing null handing at lpopCount #3024

@naoh-dw

Description

@naoh-dw

Describe the bug

Java valkey-glide lpopCount is unable to handle missing key.

Expected Behavior

Got null on lpopCount.
ref

Current Behavior

I got error.

glide.api.models.exceptions.GlideException: Unexpected return type from Glide: got null expected Object[]
    at glide.api.BaseClient.handleValkeyResponse(BaseClient.java:522)
    at glide.api.BaseClient.handleArrayResponse(BaseClient.java:580)
    at glide.api.BaseClient.lambda$lpopCount$15(BaseClient.java:1387)

Reproduction Steps

client.lpopCount("missing_key", 123)

Possible Solution

Use handleArrayOrNullResponse instead of handleArrayResponse in lpopCount

Additional Information/Context

No response

Client version used

1.2.1

Engine type and version

Valkey 7.0

OS

any

Language

Java

Language Version

any

Cluster information

No response

Logs

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

User issue 🚨Issue opened by a userUsers PainAn issue known to cause users pain, generaly open by the user.bug 🐞Something isn't workingjava ☕issues and fixes related to the java client

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions