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

Summary: OpenFile package-name scanning could be safer.
Product: utilities Reporter: Jesse Glick <jglick>
Component: CodeAssignee: issues@utilities <issues>
Status: CLOSED FIXED    
Severity: normal    
Priority: P4    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

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.