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 44213

Summary: APH.getStandardPropertyEvaluator needs to listen to file existence (was: Broken reference to "junit")
Product: projects Reporter: Milan Kubec <mkubec>
Component: AntAssignee: Jesse Glick <jglick>
Status: CLOSED FIXED    
Severity: blocker CC: dkonecny, junit-issues
Priority: P3    
Version: 4.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 41537    

Description Milan Kubec 2004-06-02 15:45:32 UTC
[dev-200406011800, JDK 1.4.2]
When I was opening various projects created in
previous versions of IDE I was getting message
about broken reference to "junit". The library was
not *explicitly* required by user. Don't know how
to reproduce.
Comment 1 David Konecny 2004-06-02 15:54:42 UTC
jpokorsky told me offline about one possibly related issue: his file of opened project contained pointing to incorrect userdir (userdir from some
older IDE session). I asked him to file it if reproducible.
Comment 2 Tomas Zezula 2004-06-03 16:17:41 UTC
It seems that this bug is not caused by Libraries.
Could someone reproduce it?
If so, could you attach the corrupted project (before fixing) and
userdir to this issue.
Comment 3 David Konecny 2004-06-04 11:56:47 UTC
Jesse, I found the cause. It is in
AntProjectHelper.getStandardPropertyEvaluator. There is XXX comment
for that. 

How to reproduce:
* open a project in IDE with userdir A and then close IDE
* delete the userdir A
* open the project in IDE with userdir B

What happens is that property is found but file
it points to does not exist. If you look at J2SEProject constructor
you will find that APH.getStandardPropertyEvaluator is called from
there. That means it is called before OpenHook get chance to update
the property according to current userdir.

Slightly modified problem experienced jpokorsky: in his case userdir A
was not deleted and properties were read from it even thought IDE is
running with userdir B.

I applied hotfix which solves first issue but second one can still happen.

new revision: 1.11; previous revision: 1.10
Comment 4 Jesse Glick 2004-06-04 12:45:23 UTC
OK, should be fixable somehow.
Comment 5 Jesse Glick 2004-06-22 18:37:02 UTC
Have a fix prepared.
Comment 6 Jesse Glick 2004-06-22 23:25:17 UTC
Never mind, I read the description more carefully and the patch I have
applied will not solve this bug. My patch handles changes made to a
fixed on disk. The code does not yet handle the case
where the value of ${} is changed after the
evaluator is created.
Comment 7 Jesse Glick 2004-06-23 00:29:07 UTC
OK, have code to handle that case too, will try it.
Comment 8 Jesse Glick 2004-06-23 00:37:48 UTC
Yup, new patch seems to fix it.
Comment 9 Jesse Glick 2004-06-23 19:14:57 UTC
committed   * Up-To-Date  1.3        
committed   * Up-To-Date  1.18       
committed   * Up-To-Date  1.11       
Comment 10 Milan Kubec 2004-07-15 12:54:04 UTC
Verified in dev-200407131800.