Giter Site home page Giter Site logo

Comments (11)

jerseyrobot avatar jerseyrobot commented on July 1, 2024

from jersey.

jerseyrobot avatar jerseyrobot commented on July 1, 2024

@glassfishrobot Commented
Reported by [email protected]

from jersey.

jerseyrobot avatar jerseyrobot commented on July 1, 2024

@glassfishrobot Commented
[email protected] said:
Created an attachment (id=7)
Thread dump of Enum.valueOf invocation

from jersey.

jerseyrobot avatar jerseyrobot commented on July 1, 2024

@glassfishrobot Commented
[email protected] said:
IMHO, the correct fix for this is from JAX-B wsimport code generation. By using
all uppercase for enum name, there would be great chance of disconnection with
the schema-specified enumeration values. For example, how JAX-B would generate
enum class for:

<s:simpleType name="EnglishCharacter">
<s:restriction base="s:string">
<s:enumeration value="A"/>
....
<s:enumeration value="a"/>
....
</s:restriction>
</s:simpleType>

An alternate solution for this issue is make Jersey be a little more supportive
of JAX-B by also check for a method named 'fromValue' on the enum type. But
this is really a brittle contract.

from jersey.

jerseyrobot avatar jerseyrobot commented on July 1, 2024

@glassfishrobot Commented
[email protected] said:
The problem with relying on JAXB generated field names is that there could be
some characters in the enumeration values that are illegal as characters of
field names.

You are right about brittle contracts. I think we need to review this whole area
and see if there is a more general and less brittle way.

The following links contain more use-cases/issues in this area:

https://jersey.dev.java.net/servlets/ReadMsg?list=users&msgNo=294

https://jersey.dev.java.net/issues/show_bug.cgi?id=15

from jersey.

jerseyrobot avatar jerseyrobot commented on July 1, 2024

@glassfishrobot Commented
[email protected] said:
You are right, I totally forgot about enum names actually have general Java name
constraint. Some spi for generic type converter specified at application level
would be enough, i think.

from jersey.

jerseyrobot avatar jerseyrobot commented on July 1, 2024

@glassfishrobot Commented
[email protected] said:
This is a duplicate of issue 15

      • This issue has been marked as a duplicate of 15 ***

from jersey.

jerseyrobot avatar jerseyrobot commented on July 1, 2024

@glassfishrobot Commented
File: threaddump.txt
Attached By: [email protected]

from jersey.

jerseyrobot avatar jerseyrobot commented on July 1, 2024

@glassfishrobot Commented
Was assigned to [email protected]

from jersey.

jerseyrobot avatar jerseyrobot commented on July 1, 2024

@glassfishrobot Commented
This issue was imported from java.net JIRA JERSEY-26

from jersey.

jerseyrobot avatar jerseyrobot commented on July 1, 2024

@glassfishrobot Commented
Marked as duplicate on Monday, January 14th 2008, 7:29:14 pm

from jersey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.