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 217524

Summary: Refactoring keeping CompilationInfos
Product: javaee Reporter: Ralph Ruijs <ralphbenjamin>
Component: PersistenceAssignee: Sergey Petrov <sj-nb>
Status: VERIFIED FIXED    
Severity: normal CC: jlahoda, pjiricka
Priority: P2    
Version: 7.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 217339    

Description Ralph Ruijs 2012-08-28 12:48:22 UTC
Please see:
http://netbeans.org/bugzilla/show_bug.cgi?id=217339#add_comment

Seems that CompilationInfos are held through AbstractRefactoring, which is held
through Undo support (and possibly other roots). Please make sure refactoring
is not retaining CompilationInfos outside parsing tasks. One suspicious method
is (j2ee.jpa.refactoring's) RefactoringUtil#getCompilationInfo:153.

Thank you very much.
Comment 1 Sergey Petrov 2012-09-07 13:51:12 UTC
yes, this method adds compilationinfo into lookup of abstractrefactoring, may be it was done for caching purpose but there may be some more leaking if undo keep it will check. 
Is RefactoringElementsBag dismissed after refactoring or stored somewhere?
Comment 2 Sergey Petrov 2012-09-07 15:46:50 UTC
http://hg.netbeans.org/web-main/rev/76d3dc916fab
avoid addition of CompilationController into context, but general design isn't fixed, it still used outside of java source task but in fact I see no leaking in CompilationController in Loaded Classes monitor after the fix.
please reopen if complete design fix is required.
Comment 3 Quality Engineering 2012-09-09 02:03:04 UTC
Integrated into 'main-golden', will be available in build *201209090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/76d3dc916fab
User: Sergey B. Petrov <sj-nb@netbeans.org>
Log: #217524 compilation controller isn't added to context
Comment 4 Jiri Skrivanek 2013-01-21 11:11:43 UTC
Closing this bug as fixed because reporter doesn't provide negative feedback.