Reputation: 3
In my project are some classes which are supposed to be de-/serialized via jackson. All of them should ignore unkown properties so i annotated them with @JsonIgnoreProperties(ignoreUnknown = true).
To ensure that all of them are properly annotated i tried to write a jqassistant rule to check the annotation but i am not able to read the value of ignoreUnknoen. All i get is null.
Query:
match
(annotation:Annotation)-[:OF_TYPE]->(type:Type),
(annotation)-[:HAS]->(ignoreUnknownAttribute:Value)
where
type.fqn="com.fasterxml.jackson.annotation.JsonIgnoreProperties"
and ignoreUnknownAttribute.name="ignoreUnknown"
return
ignoreUnknownAttribute.VALUE as ingoreUnknown
Result:
found ignoreUnknown Attributes (2 which is correct) but without value
What am i doing wrong? ;-)
Upvotes: 0
Views: 68
Reputation: 1266
The problem is in the return clause, the property name needs to be in lower case:
...
return
ignoreUnknownAttribute.value as ingoreUnknown
Upvotes: 1