This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 32743
Collapse All | Expand All

(-)AbstractFileObject.java (-6 / +12 lines)
Lines 217-227 Link Here
217
217
218
    /** Unlocks the file. Notifies the underlaying impl.
218
    /** Unlocks the file. Notifies the underlaying impl.
219
    */
219
    */
220
    synchronized void unlock () {
220
    synchronized void unlock (FileLock fLock) {
221
        getAbstractFileSystem ().info.unlock (getPath ());
221
        FileLock currentLock = null;
222
        lastModified = null;
222
        if (lock != null) {
223
        // clear my lock
223
            currentLock = (FileLock)lock.get();
224
        lock = null;
224
        }
225
        if (currentLock == fLock) {
226
            getAbstractFileSystem ().info.unlock (getPath ());
227
            lastModified = null;
228
            // clear my lock
229
            lock = null;
230
        }
225
    }
231
    }
226
232
227
    /** Tests the lock if it is valid, if not throws exception.
233
    /** Tests the lock if it is valid, if not throws exception.
Lines 793-799 Link Here
793
        public void releaseLock () {
799
        public void releaseLock () {
794
            if (this.isValid()) {
800
            if (this.isValid()) {
795
                super.releaseLock();
801
                super.releaseLock();
796
                unlock ();
802
                unlock (this);                
797
            }
803
            }
798
        }
804
        }
799
    }
805
    }

Return to bug 32743