Bug 274917 - Incorrect "empty block" warning underlining on annotations
Summary: Incorrect "empty block" warning underlining on annotations
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows Vista
: P3 trivial (vote)
Target Milestone: 3.5 RC1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-04 20:25 EDT by Chris West (Faux) CLA
Modified: 2009-05-14 11:07 EDT (History)
4 users (show)

See Also:
david_audel: review+


Attachments
Proposed fix (4.15 KB, patch)
2009-05-05 11:35 EDT, Olivier Thomann CLA
no flags Details | Diff
Proposed fix (2.78 KB, patch)
2009-05-05 20:23 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris West (Faux) CLA 2009-05-04 20:25:37 EDT
Build ID: N20090419-2000

1. Create the following class:

// --------------------v
@interface FooAnnotation {
}

2. Enable the "Undocumented empty block" warning.

Observe how the "n" and the following space is underlined, unlike with non @interface classes.

Compare with:
// ------------------v
interface FooInterface {
}
Comment 1 Dani Megert CLA 2009-05-05 03:03:51 EDT
This has been fixed the opposite way in recent builds: the warning is now also issued for:

interface FooInterface {
}
Comment 2 Markus Keller CLA 2009-05-05 06:23:20 EDT
Reopening. This bug is about the wrong *range* of the warning in the *annotation* case.
Comment 3 Olivier Thomann CLA 2009-05-05 11:35:12 EDT
Created attachment 134450 [details]
Proposed fix
Comment 4 Olivier Thomann CLA 2009-05-05 11:36:18 EDT
David, please review.
Comment 5 Olivier Thomann CLA 2009-05-05 20:23:46 EDT
Created attachment 134552 [details]
Proposed fix

Reduced patch. Two methods were actually identical.
Comment 6 David Audel CLA 2009-05-06 05:16:08 EDT
Patch looks good.
Comment 7 Olivier Thomann CLA 2009-05-06 08:59:02 EDT
Released for 3.5RC1.
Added regression test in org.eclipse.jdt.core.tests.compiler.regression.AnnotationTest#test269
Comment 8 Kent Johnson CLA 2009-05-14 11:07:09 EDT
Verified for 3.5RC1 using I20090513-2000