Skip to content

Comments

Avoid possible serialization issues related to ArraySeq#1632

Merged
stevedlawrence merged 1 commit intoapache:mainfrom
stevedlawrence:daffodil-3073-varargs-serialization-compatibility
Feb 23, 2026
Merged

Avoid possible serialization issues related to ArraySeq#1632
stevedlawrence merged 1 commit intoapache:mainfrom
stevedlawrence:daffodil-3073-varargs-serialization-compatibility

Conversation

@stevedlawrence
Copy link
Member

The ArraySeq class has been known to cause deserialization failures related to saving/reloading parsers because the class is written in a way as to cause serialization sensitivity to changes in the class.

We don't use ArraySeq in any of our serialized classes, but Scala implements varargs using ArraySeq, and we do use varargs in the serialized CompiledDPath class. This can make serialized objects sensitive to different versions of Scala if they make changes to the class.

We do not need any of the features provided by ArraySeq or varargs, so this converts the ops member of CompiledDPath to an Array, avoiding potential deserialzation issues with future versions of Daffodil.

DAFFODIL-3073

The ArraySeq class has been known to cause deserialization failures
related to saving/reloading parsers because the class is written in a
way as to cause serialization sensitivity to changes in the class.

We don't use ArraySeq in any of our serialized classes, but Scala
implements varargs using ArraySeq, and we do use varargs in the
serialized CompiledDPath class. This can make serialized objects
sensitive to different versions of Scala if they make changes to the
class.

We do not need any of the features provided by ArraySeq or varargs, so
this converts the ops member of CompiledDPath to an Array, avoiding
potential deserialzation issues with future versions of Daffodil.

DAFFODIL-3073
Copy link
Contributor

@jadams-tresys jadams-tresys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor

@olabusayoT olabusayoT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@stevedlawrence stevedlawrence merged commit 32bc90f into apache:main Feb 23, 2026
19 of 20 checks passed
@stevedlawrence stevedlawrence deleted the daffodil-3073-varargs-serialization-compatibility branch February 23, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants