Bug 191908 - [1.5][compiler] Missing strike through for deprecated declaration fragment
Summary: [1.5][compiler] Missing strike through for deprecated declaration fragment
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3.1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 191909 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-11 05:18 EDT by Benno Baumgartner CLA
Modified: 2008-09-16 09:45 EDT (History)
3 users (show)

See Also:


Attachments
Proposed fix + regression tests (191908 and 191909) (6.03 KB, patch)
2007-06-14 15:23 EDT, Olivier Thomann CLA
no flags Details | Diff
Better patch with more regression tests (9.26 KB, patch)
2007-06-14 16:00 EDT, Olivier Thomann CLA
no flags Details | Diff
Proposed fix + regression tests (11.06 KB, patch)
2007-06-22 10:58 EDT, Olivier Thomann CLA
no flags Details | Diff
Proposed fix + regression test (9.25 KB, patch)
2007-06-22 11:47 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 Benno Baumgartner CLA 2007-06-11 05:18:19 EDT
I20070608-1718

Given:
package test1;
public class E01 {
	@Deprecated
	public static int x= 5, y= 10
}

Is:
 Only first field declaration fragment is rendered with a strike through
Should:
 All fragments are deprecated, Java Lang spec 3, 8.3: "More then one field may be declared in a single field declaration by using more then one declarator; the FieldModifiers and Type apply to all the declarations in the declaration."
Comment 1 Benno Baumgartner CLA 2007-06-11 05:23:23 EDT
Maybe related to bug 191909
Comment 2 Dani Megert CLA 2007-06-11 05:26:17 EDT
The VariableBinding for 'y' says binding.isDeprecated() == false
Comment 3 Olivier Thomann CLA 2007-06-14 15:12:21 EDT
The bug comes from the fact that we don't propagate the tagBits for all field fragments.
Comment 4 Olivier Thomann CLA 2007-06-14 15:23:00 EDT
Created attachment 71360 [details]
Proposed fix + regression tests (191908 and 191909)
Comment 5 Olivier Thomann CLA 2007-06-14 15:23:26 EDT
*** Bug 191909 has been marked as a duplicate of this bug. ***
Comment 6 Olivier Thomann CLA 2007-06-14 15:27:30 EDT
Since we share annotations, we want to resolve them only once, but we still want to set the tagBits for all the field bindings.
The patch fixes both bug 191908 and bug 191909.
191909 is a consequence of the first one.
Comment 7 Olivier Thomann CLA 2007-06-14 16:00:02 EDT
Created attachment 71362 [details]
Better patch with more regression tests
Comment 8 Olivier Thomann CLA 2007-06-22 10:58:34 EDT
Created attachment 72181 [details]
Proposed fix + regression tests
Comment 9 Olivier Thomann CLA 2007-06-22 11:47:03 EDT
Created attachment 72190 [details]
Proposed fix + regression test

Remove one regression test from previous patch since it was not related to this bug.
Comment 10 Olivier Thomann CLA 2007-06-22 11:49:21 EDT
Released in HEAD for 3.4M1.
Regression tests added in:
org.eclipse.jdt.core.tests.dom.ASTConverter15Test#test0274
org.eclipse.jdt.core.tests.dom.ASTConverter15Test#test0275

org.eclipse.jdt.core.tests.compiler.regression.Deprecated15Test#test004
org.eclipse.jdt.core.tests.compiler.regression.DeprecatedTest#test019

Leave the bug open to release it for 3.3.1.
Comment 11 Olivier Thomann CLA 2007-07-04 11:22:15 EDT
Released for 3.3.1.
Regression tests added in:
org.eclipse.jdt.core.tests.dom.ASTConverter15Test#test0274
org.eclipse.jdt.core.tests.dom.ASTConverter15Test#test0275

org.eclipse.jdt.core.tests.compiler.regression.Deprecated15Test#test004
org.eclipse.jdt.core.tests.compiler.regression.DeprecatedTest#test019
Comment 12 Olivier Thomann CLA 2007-07-09 08:44:08 EDT
Philippe,

+1 for 3.3.1?
Comment 13 Philipe Mulet CLA 2007-07-09 09:42:31 EDT
Given this is not a regression, I don't see this being critical enough to be in 3.3.1... 3.4 is likely good enough.
Comment 14 Philipe Mulet CLA 2007-07-09 09:43:38 EDT
Since patch is available already for 3.3.1, then go ahead. +1 for 3.3.1
Comment 15 Frederic Fusier CLA 2007-08-07 06:05:24 EDT
Verified for 3.4M1 using build I20070806-1800.
Comment 16 Frederic Fusier CLA 2007-08-07 06:05:58 EDT
Reopen for 3.3.1 verification
Comment 17 Frederic Fusier CLA 2007-08-07 06:13:57 EDT
.
Comment 18 Eric Jodet CLA 2007-09-03 09:33:27 EDT
Verified for 3.3.1 using build M20070831-2000