eclipse-ee4j / eclipse-ee4j/jersey

enum should be serialized with name and not default toString

Open
#5,288 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

`org.glassfish.jersey.client.proxy.WebResourceFactory.invoke(Object, Method, Object[]) ` uses the value as is, which defaults to using the `toString()` method which causes issues with enums when the `toString()` does not return the same value as the `name()`

This forces implementation to provide a `public static fromString(String x)` method.

Jersey Version: jersey-proxy-client-2.38.jar

Would it be possible to use the `name()` instead if the Class of the given value is an enum?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.