Skip to content

Fixed: Copying a deserialized GenericValue fails with "observable cannot be null" (OFBIZ-13775) - #2507

Merged
mridulpathak merged 1 commit into
apache:trunkfrom
mridulpathak:OFBIZ-13775
Oct 30, 2026
Merged

mridulpathak merged 1 commit into
apache:trunkfrom
mridulpathak:OFBIZ-13775

Conversation

@mridulpathak

Copy link
Copy Markdown
Contributor

GenericEntity keeps its Observable in a transient field, so it is null once the entity has been deserialized. GenericEntity.init(GenericEntity), used by GenericValue.create and the copy constructors, and refreshFromValue built the new Observable from that field directly, so copying or refreshing from a value restored from a persisted session failed with an IllegalArgumentException. Both now read it through the existing lazy getObservable().

GenericEntity keeps its Observable in a transient field, so it is null once the entity has been deserialized. The copy constructor path used by GenericValue.create and refreshFromValue built the new Observable from that field directly and failed with "observable cannot be null" when the source value came from a restored session. Both now read it through the existing lazy getObservable().
@github-actions github-actions Bot added the bug label Oct 30, 2026
@mridulpathak
mridulpathak merged commit 1234bc3 into apache:trunk Oct 30, 2026
7 checks passed
@mridulpathak
mridulpathak deleted the OFBIZ-13775 branch October 30, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant