1.1 --- a/mdr/src/org/netbeans/mdr/util/TransactionMutex.java Sun Oct 19 21:25:36 2003 +0000
1.2 +++ b/mdr/src/org/netbeans/mdr/util/TransactionMutex.java Sun Oct 19 21:35:42 2003 +0000
1.3 @@ -157,10 +157,13 @@
1.4
1.5 public synchronized void mutateToWrite() {
1.6 Thread thread = Thread.currentThread();
1.7 - if (readers.get(thread) == null) {
1.8 - throw new DebugException("Cannot mutate transaction - no transaction opened.");
1.9 + if (writer != thread) {
1.10 + if (readers.get(thread) == null) {
1.11 + throw new DebugException("Cannot mutate transaction - no transaction opened.");
1.12 + }
1.13 + mutators.add(Thread.currentThread());
1.14 }
1.15 - mutators.add(Thread.currentThread());
1.16 + enter(true);
1.17 }
1.18
1.19 /**