]
Nistor Adrian updated IPROTO-114:
---------------------------------
Fix Version/s: 4.3.0.Alpha14
(was: 4.3.0.Alpha13)
Date fields not initialized with @ProtoFactory
----------------------------------------------
Key: IPROTO-114
URL:
https://issues.jboss.org/browse/IPROTO-114
Project: Infinispan ProtoStream
Issue Type: Bug
Affects Versions: 4.3.0.Alpha11
Reporter: Ryan Emerson
Assignee: Nistor Adrian
Priority: Major
Fix For: 4.3.0.Alpha14
{code:java}
public class Reproducer {
@ProtoField(number = 1)
final Date date;
@ProtoFactory
public Reproducer(Date date) {
this.date = date;
}
}
{code}
Results in the following marshaller code which does not compile:
{code:java}
@javax.annotation.Generated(value =
"org.infinispan.protostream.annotations.impl.processor.AutoProtoSchemaBuilderAnnotationProcessor",
comments = "Please do not edit this file!")
@org.infinispan.protostream.annotations.impl.OriginatingClasses({
"org.infinispan.query.dsl.embedded.testdomain.Reproducer"
})
@SuppressWarnings("unchecked")
public final class
Reproducer$___Marshaller_b7bc8e88b59172b5316adfc20e38742eb183ea955e2ff0dbf8d9fc9cd93038b7
extends org.infinispan.protostream.annotations.impl.GeneratedMarshallerBase implements
org.infinispan.protostream.RawProtobufMarshaller<org.infinispan.query.dsl.embedded.testdomain.Reproducer>
{
@Override
public Class<org.infinispan.query.dsl.embedded.testdomain.Reproducer>
getJavaClass() { return org.infinispan.query.dsl.embedded.testdomain.Reproducer.class; }
@Override
public String getTypeName() { return
"org.infinispan.test.query.dsl.Reproducer"; }
@Override
public org.infinispan.query.dsl.embedded.testdomain.Reproducer
readFrom(org.infinispan.protostream.ImmutableSerializationContext $1,
org.infinispan.protostream.RawProtoStreamReader $2) throws java.io.IOException {
java.util.Date __v$1;
boolean done = false;
while (!done) {
final int tag = $2.readTag();
switch (tag) {
case 0:
done = true;
break;
case 9: {
__v$1 = new java.util.Date($2.readFixed64());
break;
}
default: {
if (!$2.skipField(tag)) done = true;
}
}
}
return new org.infinispan.query.dsl.embedded.testdomain.Reproducer(__v$1);
}
@Override
public void writeTo(org.infinispan.protostream.ImmutableSerializationContext $1,
org.infinispan.protostream.RawProtoStreamWriter $2,
org.infinispan.query.dsl.embedded.testdomain.Reproducer $3) throws java.io.IOException {
final org.infinispan.query.dsl.embedded.testdomain.Reproducer o =
(org.infinispan.query.dsl.embedded.testdomain.Reproducer) $3;
{
final java.util.Date __v$1 = o.date;
if (__v$1 != null) $2.writeFixed64(1, __v$1.getTime());
}
}
}
{code}