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.
Summary: | APH.getStandardPropertyEvaluator needs to listen to file existence (was: Broken reference to "junit") | ||
---|---|---|---|
Product: | projects | Reporter: | Milan Kubec <mkubec> |
Component: | Ant | Assignee: | 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
jpokorsky told me offline about one possibly related issue: his private.properties file of opened project contained user.properties.file pointing to incorrect userdir (userdir from some older IDE session). I asked him to file it if reproducible. 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. 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 user.properties.file 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. Hotfix: src/org/netbeans/spi/project/support/ant/AntProjectHelper.java new revision: 1.11; previous revision: 1.10 OK, should be fixable somehow. Have a fix prepared. 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 build.properties on disk. The code does not yet handle the case where the value of ${user.properties.file} is changed after the evaluator is created. OK, have code to handle that case too, will try it. Yup, new patch seems to fix it. committed * Up-To-Date 1.3 ant/project/src/org/netbeans/spi/project/support/ant/ProjectProperties.java committed * Up-To-Date 1.18 ant/project/src/org/netbeans/spi/project/support/ant/PropertyUtils.java committed * Up-To-Date 1.11 ant/project/test/unit/src/org/netbeans/spi/project/support/ant/AntProjectHelperTest.java Verified in dev-200407131800. |