-
Notifications
You must be signed in to change notification settings - Fork 340
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
QueryParameterProcessor could not handle lower-case in enum string value #298
Comments
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented <s:simpleType name="EnglishCharacter"> An alternate solution for this issue is make Jersey be a little more supportive |
@glassfishrobot Commented You are right about brittle contracts. I think we need to review this whole area The following links contain more use-cases/issues in this area: https://jersey.dev.java.net/servlets/ReadMsg?list=users&msgNo=294 |
@glassfishrobot Commented |
@glassfishrobot Commented
|
@glassfishrobot Commented |
@glassfishrobot Commented |
|
Jersey get IllegalArgumentException with query param of JAX-B generated type like:
@XmlType(name = "casingEnum")
@XmlEnum
public enum CasingEnum {
@XmlEnumValue("Upper")
UPPER("Upper"), @XmlEnumValue("Lower")
LOWER("Lower"),
@XmlEnumValue("Proper")
PROPER("Proper");
private final String value;
CasingEnum(String v)
{ value = v; }
public String value()
{ return value; }
public static CasingEnum fromValue(String v) {
for (CasingEnum c: CasingEnum.values()) {
if (c.value.equals(v))
{ return c; }
}
throw new IllegalArgumentException(v);
}
}
Environment
Operating System: All
Platform: All
The text was updated successfully, but these errors were encountered: