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

Create new JavaType subtype IterationType (extending SimpleType) #3950

Closed
cowtowncoder opened this issue May 22, 2023 · 2 comments · Fixed by #3952
Closed

Create new JavaType subtype IterationType (extending SimpleType) #3950

cowtowncoder opened this issue May 22, 2023 · 2 comments · Fixed by #3952
Labels
2.16 Issues planned for 2.16
Milestone

Comments

@cowtowncoder
Copy link
Member

cowtowncoder commented May 22, 2023

(note: possible replacement/impl of #3926)

There are benefits in recognizing types like:

  • Iterator
  • Stream
  • DoubleStream / IntStream / LongStream

as first-class JavaType variants (see FasterXML/jackson-dataformat-xml#597 f.ex).
It should be based on SimpleType, similar to ReferenceType.

If and when implemented we could consider whether to extend Deserializers, Serializers and other extension points.
Also: would need to add support by Scala module, possibly Kotlin (and maybe Guava?).

@cowtowncoder cowtowncoder added to-evaluate Issue that has been received but not yet evaluated 2.16 Issues planned for 2.16 and removed to-evaluate Issue that has been received but not yet evaluated labels May 22, 2023
@cowtowncoder cowtowncoder linked a pull request May 24, 2023 that will close this issue
@cowtowncoder cowtowncoder added this to the 2.16.0 milestone May 24, 2023
cowtowncoder added a commit that referenced this issue May 24, 2023
@cowtowncoder
Copy link
Member Author

@pjfanning Now implemented for core JDK types as per description. Might make sense to add support by Scala module too?

@JooHyukKim Should be possibly to use the new JavaType.isIterationType() method from XML module to simplify checking (plus support Scala iterators too if and when support added).

@JooHyukKim
Copy link
Member

@cowtowncoder Great 👍🏻🔥 I will try to apply the changes accordingly.

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

Successfully merging a pull request may close this issue.

2 participants