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.

Bug 110549 - Pending locks are reported even through all locks have been unlocked
Summary: Pending locks are reported even through all locks have been unlocked
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: rmatous
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks: 110305
  Show dependency tree
 
Reported: 2007-07-23 10:32 UTC by David Kaspar
Modified: 2008-12-22 13:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed API change, test, improved impl. of potential locks in LocalFileSystemEx (7.83 KB, application/octet-stream)
2007-07-24 16:05 UTC, rmatous
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Kaspar 2007-07-23 10:32:00 UTC
How to reproduce:
1) Create a new "Mobility|Mobility Application" app.
2) Right-click on the project node and select "New" popup menu item.
3) Note - the "New" sub-menu has to appear.
4) Close IDE
5) ERROR - List of pending locks is reported and the "Templates/MIDP/VisualDesign.vmd" and other templates are listed.
The templates are MultiDataObjects (.java and .vmd files), they are locked and always unlocked using "MfLock.releaseLock".
The issue could be that the "map" field within the lock does not contains any entry (MfLock.addLock is not called).
Comment 1 rmatous 2007-07-24 14:59:24 UTC
Potential locks are not reliably implemented because current implementation is missing information of locked files and
uses hacks (createLocksOn) for achieve it. Adding new API FileObject.isLocked could be enough to be able to decide
whether potential locked file is really locked. To make it even better we could add methods notifyLock, notifyUnlock
into MultiFileSystem. Method isLocked was already required AFAIK anyway.
Comment 2 rmatous 2007-07-24 16:05:55 UTC
Created attachment 45597 [details]
proposed API change, test, improved impl. of potential locks in LocalFileSystemEx
Comment 3 Jesse Glick 2007-07-24 18:48:50 UTC
Missing @since on FO.iL().

Import of Exceptions in FO.java unnecessary.

Don't forget to update <date> when you actually commit.
Comment 4 rmatous 2007-07-26 13:34:53 UTC
I believe this isn't controversial, so will be fixed today.
Comment 5 rmatous 2007-07-26 16:34:05 UTC
/cvs/openide/fs/src/org/openide/filesystems/MIMESupport.java,v  <--  MIMESupport.java
new revision: 1.21; previous revision: 1.20

/cvs/openide/fs/src/org/openide/filesystems/FileObject.java,v  <--  FileObject.java
new revision: 1.19; previous revision: 1.18

/cvs/openide/fs/src/org/openide/filesystems/AbstractFileObject.java,v  <--  AbstractFileObject.java
new revision: 1.11; previous revision: 1.10

/cvs/openide/fs/src/org/openide/filesystems/MultiFileObject.java,v  <--  MultiFileObject.java
new revision: 1.12; previous revision: 1.11

/cvs/core/startup/src/org/netbeans/core/startup/layers/LocalFileSystemEx.java,v  <--  LocalFileSystemEx.java
new revision: 1.7; previous revision: 1.6

/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/MasterFileObject.java,v  <--  MasterFileObject.java
new revision: 1.66; previous revision: 1.65

/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/Delegate.java,v  <--  Delegate.java
new revision: 1.27; previous revision: 1.26

/cvs/openide/fs/apichanges.xml,v  <--  apichanges.xml
new revision: 1.15; previous revision: 1.14

/cvs/openide/fs/manifest.mf,v  <--  manifest.mf
new revision: 1.11; previous revision: 1.10

/cvs/openide/fs/test/unit/src/org/openide/filesystems/FileObjectTestHid.java,v  <--  FileObjectTestHid.java
new revision: 1.14; previous revision: 1.13