Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 207377 - [71cat] Closing project causes its re-scanning.
[71cat] Closing project causes its re-scanning.
Product: java
Classification: Unclassified
Component: Project
All All
: P3 (vote)
: 7.2
Assigned To: Tomas Zezula
Depends on:
  Show dependency treegraph
Reported: 2012-01-17 08:24 UTC by Petr Cyhelsky
Modified: 2012-01-25 16:31 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT

stacktrace (4.63 KB, text/plain)
2012-01-17 08:24 UTC, Petr Cyhelsky

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Cyhelsky 2012-01-17 08:24:10 UTC
Build: NetBeans IDE Dev (Build 201201150601)
VM: Java HotSpot(TM) Client VM, 22.0-b10, Java(TM) SE Runtime Environment, 1.7.0_02-b13
OS: Linux

User Comments:
muellermi: just to provide information

cyhelsky: scan was initiated by closing all projects - imho there should be no scan in this case

java.lang.Exception: Scan canceled.
   at java.lang.Thread.getStackTrace(
   at org.netbeans.modules.parsing.impl.indexing.LogContext.create(
   at org.netbeans.modules.parsing.impl.indexing.LogContext.create(
   at org.netbeans.modules.parsing.impl.indexing.PathRegistry.scheduleFirer(
   at org.netbeans.modules.parsing.impl.indexing.PathRegistry.resetCacheAndFire(
   at org.netbeans.modules.parsing.impl.indexing.PathRegistry.access$500(
Comment 1 Petr Cyhelsky 2012-01-17 08:24:13 UTC
Created attachment 114954 [details]
Comment 2 David Strupl 2012-01-19 14:57:47 UTC
When closing project the method


triggers saving of project files and$ProjectMetadataListener.configurationXmlChanged(

listens and through resetCaches triggers change in project roots.
Comment 3 Jesse Glick 2012-01-19 21:03:44 UTC
Perhaps resetCaches could check whether there is an actual change in sourceRootURLs and/or sourceRootProperties before refiring an event. What is the actual query triggering indexer rescan - Sources, SourceForBinaryQuery.Result, ClassPathImplementation (for SOURCE), or some combination?
Comment 4 Tomas Zezula 2012-01-19 21:21:53 UTC
The SR fired as the event come from projectXMLChanged.
To verify that the sourceRootProperties has changed the resetCaches will need to parse the projectXML, this may be problematic if lots of event comes.
When only property changes the SR fire only if changed property is a source root property.
But the change come form private.xml, ignoring the event when ev.getPath() == APH.PRIVATE_XML_PATH may be enough. I will try.
Comment 5 Tomas Zezula 2012-01-20 13:11:09 UTC
fixed jet-main b9fc9222ea3c
Comment 6 Quality Engineering 2012-01-25 16:31:23 UTC
Integrated into 'main-golden', will be available in build *201201250600* on (upload may still be in progress)
User: Tomas Zezula <>
Log: #207377:[71cat] Closing project causes its re-scanning.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo