Affects versions: None
Fix versions: Release 1.11
Patch:Code and Test
Subvectors created with subvec from a PersistentVector cannot be made transient:
Cause: APersistentVector$SubVector does not implement IEditableCollection
Approach: Create a TransientSubVector based on an underlying TransientVector.
- It's okay for TransientSubVector to delegate the ensureEditable functionality to the underlying TransientVector (sometimes explicitly, sometimes implicitly) - calling ensureEditable explicitly also requires that the field for the underlying vector be the concrete TransientVector type rather than the ITransientVector interface.
- When an operation that would throw an exception on a PersistentVector happens from the wrong thread (or after persistent!), we throw that exception rather than the IllegalAccessError that transients throw when accessed inappropriately.