]
Adrian Nistor updated IPROTO-82:
--------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
Integrated in master and 4.2.x
Useless warnings regarding undefined proto schema annotations
-------------------------------------------------------------
Key: IPROTO-82
URL:
https://issues.jboss.org/browse/IPROTO-82
Project: Infinispan ProtoStream
Issue Type: Bug
Reporter: Adrian Nistor
Assignee: Adrian Nistor
Priority: Major
Fix For: 4.3.0.Alpha1, 4.2.3.Final
Protostream emits the warning "Encountered and ignored and unknown
annotation..." whenever it parses the documentation text of a definition which
contains (pseudo)annotations that were not defined. These warnings do not always make
sense for all use cases of a certain schema. For example a user might have some indexing
related annotations that are used by the server, but those same anontations will also be
seen by the client when parsing the schema and the client does not need to know or care
about them. This means the client does not define them in the Protostream configuration to
be parsed, so the parser will complain about them later saying they are unknown.
This issue is benign, as the log message in question is just a WARNing and no exception
is thrown, so there is no functional impact on the user app, but it is very noisy and it
clogs the log.
The proposed fix is to not emit any such warnings if there are no custom defined
annotations in config. If there is at least one custom annotation, then the old behaviour
will continue to exist.
An new config flag (AnnotationsConfig.logUndefinedAnnotations - default _true_) is
introduced to be able to turn this warning off completely if needed.