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 2640 - OpenFile package-name scanning could be safer.
Summary: OpenFile package-name scanning could be safer.
Status: CLOSED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: All All
: P4 normal (vote)
Assignee: issues@utilities
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-07-21 20:05 UTC by Jesse Glick
Modified: 2003-07-01 15:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 1999-07-21 20:05:36 UTC
Since a Java source file must contain a package declaration as the first token other than comments and whitespace, it should not be difficult to make the package name scanning more robust than it is
--i.e. actually build a simple but correct tokenizer which only recognizes whitespace, comment delimiters, `package`, and package names; when it encountered anything other than these (e.g. import, cla
ss decl), abort at once. Currently it might be confused about a package decl occurring within a comment block or something, In practice this is likely to be pretty rare.
Comment 1 pfelenda 2003-04-03 13:09:38 UTC
Verified in dev 200304020100.
Comment 2 Quality Engineering 2003-07-01 15:31:16 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.