Bug 23207 - Flags.isDeprecated(IMethod.getFlags()) doesn't work
Summary: Flags.isDeprecated(IMethod.getFlags()) doesn't work
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 2.1 M3   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-05 05:20 EDT by Claude Knaus CLA
Modified: 2002-11-13 06:43 EST (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 Claude Knaus CLA 2002-09-05 05:20:22 EDT
tried with 20020903-I on w2k and linux-gtk:

It seems that the deprecated flag isn't set for IMethod.

---8<--- A.java ---
public class A {
	/**
	 * @deprecated
	 */
    public void foo(int value) {}
}
---8<--- B.java ---
public class B extends A {
	
    /**
     * @see A#foo(int)
     * @depreacated        <--- this line is missing
     */
	public void foo(int value) {}
}
---8<---

The javadoc for B.foo() was created with "Source :: Add JavaDoc Comment".
It should notice the deprecated flag in A.foo() and add the @deprecated tag
to the JavaDoc comment (See use in AddJavaDocStubOperation:86).
Comment 1 Philipe Mulet CLA 2002-09-05 11:35:03 EDT
This belongs to the javadoc generator.
Comment 2 Claude Knaus CLA 2002-09-05 11:44:15 EDT
Philippe,

I'm using the same code for generating javadocs using auto-indentation and I 
don't see an obvious error in using the flags of IMethod. I just added the 
example to show you where the problem surfaces. Is there a misunderstanding in 
how to use these flags?
Comment 3 Philipe Mulet CLA 2002-09-05 12:58:45 EDT
Oh, I see. We will investigate.

Jerome - are we flushing the deprecated flag when applying the bitmask ?
Comment 4 Jerome Lanneluc CLA 2002-10-28 11:48:01 EST
Yes, we were flushing the deprecated flag in the SourceElementParser.
Fixed.
Comment 5 Jerome Lanneluc CLA 2002-10-29 09:16:57 EST
Added regression test CompilationUnitTests.testDeprecatedFlag()
Comment 6 David Audel CLA 2002-11-13 06:43:53 EST
Verified.