Server: allow adding mutators to copied objects

for now, at least
This commit is contained in:
2024-10-12 14:20:33 +02:00
parent fc2e214ea4
commit fa61e2b402

View File

@@ -367,9 +367,12 @@ public class JObjectTxManager {
//TODO: Asserts for rwLock/rwLockNoCopy?
var got = state._writeObjects.get(obj);
if (got == null) throw new IllegalStateException("Object not in transaction");
if (got._copy)
throw new IllegalStateException("Mutating object locked with copy?");
if (got == null)
throw new IllegalStateException("Object not in transaction");
if (got._copy) {
Log.trace("Ignoring mutator for copied object: " + obj.getMeta().getName());
return;
}
got._mutators.addLast(mut);
}