Bug 71467 - JavaConventions.ValidatePackageName() does not return ERROR
Summary: JavaConventions.ValidatePackageName() does not return ERROR
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 3.0.1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-05 10:48 EDT by Murali Pattathe CLA
Modified: 2004-09-06 10:31 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Murali Pattathe CLA 2004-08-05 10:48:35 EDT
The JavaConventions.ValidatePackageName() does not return error under the 
following condition.

The package name starting with Capital letter + few characters + period + few 
characters + & + few characters.

for ex:  Test.sample&plugin

The method always return warning instead of an ERROR.
Comment 1 Olivier Thomann CLA 2004-08-06 11:18:57 EDT
Once you fix the first warning that says a package name should not start with an
uppercase letter, you get an error:
'sample&plugin' is not a valid Java identifier.
I think the right way to do it is to abort if an error is found, but continue
validation if a warning is found. With your test case, this would immediately
report an error instead of a warning and then an error when the warning case is
fixed. But if no error is found, then the warning would be returned.
Comment 2 Olivier Thomann CLA 2004-08-06 11:30:33 EDT
The fix should be backported to 3.0.maintenance stream.
Comment 3 Olivier Thomann CLA 2004-08-06 12:35:37 EDT
Fixed and released in HEAD.
Regression tests added.
Comment 4 Olivier Thomann CLA 2004-08-06 12:37:07 EDT
Backported to stream 3.0.maintenance.
Comment 5 Olivier Thomann CLA 2004-08-26 09:59:19 EDT
Changed milestone to reflect fix backported in 3.0.1.
Comment 6 David Audel CLA 2004-09-06 10:31:15 EDT
Verified for 3.0.1 RC1