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
UnsetValueandJavaValueConverterdependencies. The latter requiresTypeSystemto be created. The approach with creating of protoValue, and then converting it to Java expression looks a bit redundant when we have aFieldTypeat our disposal, and can provideExpressionright away.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request