generated from SpineEventEngine/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
This trait can yield expressions to check if a field holds a default value without using JavaValueConverter
and UnsetValue
types.
The advantages are the following:
- The yielded expressions would be more type-tailored. Since, we no longer rely on rules, we can check the default value not only with
equals()
method. For collections, strings and bytes, we can just check their size. For numbers, use== 0
. And only for messages and enums, useequals()
. - This trait will no longer need
UnsetValue
andJavaValueConverter
dependencies. The latter requiresTypeSystem
to be created. The approach with creating of protoValue
, and then converting it to Java expression looks a bit redundant when we have aFieldType
at our disposal, and can provideExpression
right away.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request