Skip to content

YOJ 2.6.0 (FieldValue refactoring)

Compare
Choose a tag to compare
@nvamelichev nvamelichev released this 10 Oct 13:12
· 26 commits to main since this release
  • #75: FieldValue is now a sealed interface in a dedicated package (<...databind>.values); old FieldValue is now also an interface and is deprecated. You'll get warning if you use old FieldValue's methods.
    • ⚠️ BREAKING CHANGE: FieldValue.get<Xxx>() methods are no longer there, not even in the deprecated old FieldValue interface. Please use FieldValue's sealed implementations' types with instanceof and switch pattern matching instead, e.g., if (value instanceof StringFieldValue strValue) { return strValue.str(); }
    • ⚠️ BREAKING CHANGE: Tuple-related types FieldValue.Tuple and FieldValue.FieldAndValue are now just Tuple and Tuple.FieldAndValue; and they were moved to a dedicated package (<...databind>.values)
    • Please use FieldValue's sealed implementations' constructors (e.g., new StringFieldValue("str")) instead of deprecated old FieldValue.of<Xxx>() methods
    • Please use FieldValue's sealed implementations' types in instanceof and switch pattern matching instead (if (value instanceof StringFieldValue str) { ... }, switch (value) { StringFieldValue str -> ...; }), instead of deprecated old FieldValue.is<Xxx>() methods