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: | getFullname() on an Identifier for an interface that is in a mounted jar returns unqualified name | ||
---|---|---|---|
Product: | java | Reporter: | Andrew Sherman <asherman> |
Component: | Unsupported | Assignee: | issues@java <issues> |
Status: | CLOSED FIXED | ||
Severity: | blocker | ||
Priority: | P1 | ||
Version: | 3.x | ||
Hardware: | PC | ||
OS: | Windows 3.1/NT | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Andrew Sherman
2001-04-05 01:29:46 UTC
I think this is not P1 issue. There is no data loss/corruption. This bug does not block work with IDE. I found the most probable cause, comment if it can be true: The parser keeps a cache of symbols internally. It is possible that, if the parser received a request to compute something in the package javax.ejb before the j2ee.jar was mounted, it didn't found any classes in that package (since they weren't mounted yet) and cached empty package. After you (or the module) mounted the j2ee.jar, it just ignored the javax.ejb package in it, since it has that package (but with wrong contents) in the cache. Note that the source text is not reparsed until it is really changed somehow. The data *may* be inconsistent when some libraries appear or disappear from the filesystems, but it is a design decision and a tradeoff between parser's accuracy and CPU horsepower requirements. The cache is completely flushed every 30 requests or so anyway. I will adjust the parser implementation so it watches out for Repository changes and flushes its caches immediately when something appears or disappears there. First I am changing the priority back to P1. This bug is breaking FJEE (EJBModule cannot write a jar file). If there were a workaround then I would agree to a lower priority. I think that there is something in what Svata suggests. yesterday I put a stack trace in Identifier's constructor which printed when an Identifier for EJBObject was made. The Identifier is definitly being made 2 or sometimes 3 times. But the bug occurs even if you are not using automount. It is not clear whether you were able to reproduce the bug or not. Please let me know if you need any help with this. I was able to reproduce it. Given that the parser works OK when the IDE is initialized, only some special conditions would cause it to produce incorrect result. I've run your sample and it reported the identifier "EJBObject" as unresolvable. So, I assumed that since the file is parsed during explorer window open and _before_ another thread alerted by project support mounts your JAR into the project, I have decided to mount the jar globally, before any project is opened. The same behaviour would occur if you open the file first (or have it parsed in some manner), then mount the jar. The parser would eventually catch up even without this fix - it serves only a several dozens of requests, then resets itself. Now it resets itself whenever repository contents change (mount, unmount, reorder) just to operate on current data. Supposedly fixed in dev & release 3.2 Target milestone -> 3.2 [010616] Verified Resolved for 3.4.x or earlier, no new info since then -> closing. |