Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 400197

Summary: [compiler] Unexpected deprecation warning if another annotation is present
Product: [Eclipse Project] JDT Reporter: Sebastian Zarnekow <sebastian.zarnekow>
Component: CoreAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, stephan.herrmann
Version: 4.3   
Target Milestone: 4.3 M6   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Sebastian Zarnekow CLA 2013-02-07 05:44:08 EST
Consider two Java classes in two different files (does not happen in one CU), setting for 'deprecation warning in deprecated' code is 'ignore':

@Deprecated
public class A1 {}

@NonNullByDefault // some arbitrary other annotation
@Deprecated
public class B1 extends A1 {}

In this scenario I get unexpected warnings on the extends A1 reference.
If I change the order of the annotations, things work like a charm
Comment 1 Jay Arthanareeswaran CLA 2013-02-07 08:54:47 EST
I can reproduce with 4.2.2 but something must have changed in the 4.3 stream. I can't reproduce the bug with the recent 4.3 builds.

Can you please check with this build?
http://download.eclipse.org/eclipse/downloads/drops4/S-4.3M5a-201302041400/
Comment 2 Jay Arthanareeswaran CLA 2013-02-07 08:59:11 EST
Stephan, do you by any chance know what might have fixed this?
Comment 3 Stephan Herrmann CLA 2013-02-07 11:18:19 EST
(In reply to comment #2)
> Stephan, do you by any chance know what might have fixed this?

Yes, I do :)

*** This bug has been marked as a duplicate of bug 384870 ***
Comment 4 Jay Arthanareeswaran CLA 2013-03-12 04:35:16 EDT
Verified for 4.3 M6 with build I20130311-2000.