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 42148 - GlobFileBuiltQuery (out-of-date badge on *.java) does not seem to work reliably
Summary: GlobFileBuiltQuery (out-of-date badge on *.java) does not seem to work reliably
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: RANDOM, REGRESSION
Depends on:
Blocks:
 
Reported: 2004-04-20 00:00 UTC by Jesse Glick
Modified: 2006-03-24 10:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-04-20 00:00:43 UTC
Usually it does; sometimes it doesn't. No obvious
pattern. Observed with both j2seproject and
apisupport/project. Seems to have something to do
with what the state of the file was when the query
impl was created. Some problems seem to disappear
after a test modification and reversion of the
file; others do not.
Comment 1 Jesse Glick 2004-04-24 00:36:29 UTC
I think I found it. GFBQ was fine (AFAIK). However it was never
receiving the right file change events nor was it getting the correct
timestamps from class files - because the filesystem was never
refreshed. The Ant module tries to refresh all filesystems after a
build. But now that masterfs is no longer mounted, it doesn't find
any! Correcting so that Ant after a build, as well as File -> Refresh,
try to get a handle to masterfs in a crude way (I don't know of a
clean API for it) and refresh it. Seems to make the badge work again.

GFBQTest was passing (and still passes with masterfs enabled) even
though it uses java.io.File in some places to make changes - because
it was directly refreshing the correct filesystem.

Radek, please do consider deprecating Repository.add/removeFileSystem
and maybe printing warnings if someone tries to use Repository methods
that refer to mounted filesystems. It would have saved some debugging
time in this case at least.
Comment 2 Jesse Glick 2004-04-25 17:38:28 UTC
committed   * Up-To-Date  1.94        ant/build.xml
committed   * Up-To-Date  1.11       
ant/src-bridge/org/apache/tools/ant/module/bridge/impl/BridgeImpl.java
committed   * Up-To-Date  1.3        
core/src/org/netbeans/core/actions/RefreshAllFilesystemsAction.java
Comment 3 Jaromir Uhrik 2005-07-14 16:20:08 UTC
Verified.