[JBoss JIRA] (IPROTO-120) Null collection fields always unmarshalled as empty collection implementation
by Nistor Adrian (Jira)
[ https://issues.jboss.org/browse/IPROTO-120?page=com.atlassian.jira.plugin... ]
Nistor Adrian updated IPROTO-120:
---------------------------------
Fix Version/s: 4.3.1.Final
(was: 4.3.0.Final)
> Null collection fields always unmarshalled as empty collection implementation
> -----------------------------------------------------------------------------
>
> Key: IPROTO-120
> URL: https://issues.jboss.org/browse/IPROTO-120
> Project: Infinispan ProtoStream
> Issue Type: Bug
> Reporter: Ryan Emerson
> Assignee: Nistor Adrian
> Priority: Major
> Fix For: 4.3.1.Final
>
>
> The following Pojo always returns an empty collection after being unmarshalled, regardless of whether {{stringList}} was null or empty when marshalled.
> {code:java}
> public class SomePojo {
> @ProtoField(number = 1, collectionImplementation = ArrayList.class)
> final List<String> stringList;
> @ProtoFactory
> public SomePojo(List<String> stringList) {
> this.stringList = stringList;
> }
> }
> {code}
> This is because the generated marshaller always creates the collection instance before attempting to read the collection content:
> {code:java}
> java.util.ArrayList __c$1 = new java.util.ArrayList();
> boolean done = false;
> while (!done) {
> final int tag = $2.readTag();
> switch (tag) {
> case 0:
> done = true;
> break;
> case 10: {
> java.lang.String __v$1 = $2.readString();
> __c$1.add(__v$1);
> break;
> }
> default: {
> if (!$2.skipField(tag)) done = true;
> }
> }
> }
>
> return new org.infinispan.query.dsl.embedded.testdomain.hsearch.SomePojo(__c$1);
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 3 months
[JBoss JIRA] (IPROTO-89) Provide means to calculate serialised message size
by Nistor Adrian (Jira)
[ https://issues.jboss.org/browse/IPROTO-89?page=com.atlassian.jira.plugin.... ]
Nistor Adrian updated IPROTO-89:
--------------------------------
Fix Version/s: 4.3.1.Final
(was: 4.3.0.Final)
> Provide means to calculate serialised message size
> --------------------------------------------------
>
> Key: IPROTO-89
> URL: https://issues.jboss.org/browse/IPROTO-89
> Project: Infinispan ProtoStream
> Issue Type: Enhancement
> Affects Versions: 4.2.2.Final
> Reporter: Ryan Emerson
> Assignee: Nistor Adrian
> Priority: Major
> Fix For: 4.3.0.Alpha14, 4.3.1.Final
>
>
> In order to be able to better estimate the size of output buffers etc, it would be useful to provide a means for a user application to retrieved the anticipated size of a serialized message from an object's current state. For example, in the protobuf-java library this is exposed via {{com.google.protobuf.MessageLite#getSerializedSize}}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 3 months
[JBoss JIRA] (IPROTO-74) Allow repeatable fields to be written as a stream
by Nistor Adrian (Jira)
[ https://issues.jboss.org/browse/IPROTO-74?page=com.atlassian.jira.plugin.... ]
Nistor Adrian updated IPROTO-74:
--------------------------------
Fix Version/s: 4.3.1.Final
(was: 4.3.0.Final)
> Allow repeatable fields to be written as a stream
> -------------------------------------------------
>
> Key: IPROTO-74
> URL: https://issues.jboss.org/browse/IPROTO-74
> Project: Infinispan ProtoStream
> Issue Type: Enhancement
> Affects Versions: 4.2.0.Final
> Reporter: Ryan Emerson
> Assignee: Nistor Adrian
> Priority: Major
> Fix For: 4.3.0.Alpha14, 4.3.1.Final
>
>
> Currently in order to write to a repeatable field it is necessary for an entire array or collection to be serialized at once. When writing larger collections it would be better if each object could be written individually from a stream.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 3 months