[ 
https://issues.apache.org/jira/browse/JOHNZON-229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16902189#comment-16902189
 ] 

Romain Manni-Bucau edited comment on JOHNZON-229 at 8/7/19 5:07 PM:
--------------------------------------------------------------------

Is list the materialization you have in mind? For jpa it is one option but a 
tons is possible so not sure it is good to let it go like that. findAny, toSet, 
toMap are also trivially good options without more meta about the stream. Can 
trigger a lot of computing where it is not desired to be serialized. IMO 
skipping Stream can also be a sane default, wdyt?

 

food for thoughts: if we support streams, then we must support Supplier<> too?


was (Author: romain.manni-bucau):
Is list the materialization you have in mind? For jpa it is one option but a 
tons is possible so not sure it is good to let it go like that. findAny, toSet, 
toMap are also trivially good options without more meta about the stream. Can 
trigger a lot of computing where it is not desired to be serialized. IMO 
skipping Stream is a sane default, wdyt?

 

food for thoughts: if we support streams, then we must support Supplier<> too?

> Mapper should support serializing java.util.stream.Stream
> ---------------------------------------------------------
>
>                 Key: JOHNZON-229
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-229
>             Project: Johnzon
>          Issue Type: Improvement
>          Components: Mapper
>    Affects Versions: 1.1.13
>            Reporter: Steven Walters
>            Priority: Major
>
> Currently, Mapper does not support serializing java.util.stream.Stream
> Since Johnzon uses Java 1.8 as the minimum supported version (which is the 
> minimum version that defines Stream).
> This has come up quite a bit in combination with JPA 2.2 which supports 
> Stream as the return of a QueryResult (in addition to List)



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to