You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@johnzon.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2019/08/07 16:58:00 UTC

[jira] [Comment Edited] (JOHNZON-229) Mapper should support serializing java.util.stream.Stream

    [ 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 4:58 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 is 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?

> 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)