Community
Participate
Working Groups
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."
Maybe related to bug 191909
The VariableBinding for 'y' says binding.isDeprecated() == false
The bug comes from the fact that we don't propagate the tagBits for all field fragments.
Created attachment 71360 [details] Proposed fix + regression tests (191908 and 191909)
*** Bug 191909 has been marked as a duplicate of this bug. ***
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.
Created attachment 71362 [details] Better patch with more regression tests
Created attachment 72181 [details] Proposed fix + regression tests
Created attachment 72190 [details] Proposed fix + regression test Remove one regression test from previous patch since it was not related to this bug.
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.
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
Philippe, +1 for 3.3.1?
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.
Since patch is available already for 3.3.1, then go ahead. +1 for 3.3.1
Verified for 3.4M1 using build I20070806-1800.
Reopen for 3.3.1 verification
.
Verified for 3.3.1 using build M20070831-2000