]
Nistor Adrian updated IPROTO-99:
--------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request:
Ability to define an empty proto message via Pojo annotations
-------------------------------------------------------------
Key: IPROTO-99
URL:
https://issues.jboss.org/browse/IPROTO-99
Project: Infinispan ProtoStream
Issue Type: Feature Request
Affects Versions: 4.3.0.Alpha7
Reporter: Ryan Emerson
Assignee: Nistor Adrian
Priority: Major
Fix For: 4.3.0.Alpha9
In some cases it's useful for a empty protobuf message to be sent, for example
formalising an implementation type.
Currently when trying to define an empty proto message by annotating a class with just
{{ProtoName}} annotation, the following error is thrown at compile time:
{code:java}
Error:(71, 8) java: Class
org.infinispan.notifications.cachelistener.cluster.AbstractClusterListenerUtilTest.StringAppender
does not have any @ProtoField annotated fields. The class should be either annotated or it
should have a custom marshaller.
{code}
It's possible to workaround this by simply creating a {{@Protofield}} annotation on a
class variable which is never initialised.