Bug 74369 - [Javadoc] incorrect javadoc in local class
Summary: [Javadoc] incorrect javadoc in local class
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M3   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-20 16:31 EDT by Kelvin CLA
Modified: 2004-11-03 07:57 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kelvin CLA 2004-09-20 16:31:40 EDT
e.g

public class Test {

   public void method() {
       /**
        * not javadoc comment
        */
        System.out.println("println");
        class Local {

        }
    }
}

Eclipse AST will consider the "/**" as the javadoc of the local class "Local", 
but I think it is incorrect, since there have a println statement separate the 
node.
Comment 1 Olivier Thomann CLA 2004-09-20 17:27:58 EDT
What build are you using?
Comment 2 Kelvin CLA 2004-09-20 17:30:40 EDT
i am using eclipse 3.0 build 200406251208, but my JDT plugin is still using 
2.1.3
Comment 3 Olivier Thomann CLA 2004-09-22 16:05:39 EDT
Reproduced in 3.1.
I am investigating it.
Comment 4 Olivier Thomann CLA 2004-09-23 10:38:39 EDT
Frederic, could you please have a look at this?
Comment 5 Olivier Thomann CLA 2004-09-27 13:11:19 EDT
You can activate the test
org.eclipse.jdt.core.tests.dom.ASTConverterTest2._test0572() when this problem
is fixed.
Comment 6 Frederic Fusier CLA 2004-09-27 13:22:59 EDT
ok, thanks
Comment 7 Olivier Thomann CLA 2004-09-29 12:07:48 EDT
The test is now:
org.eclipse.jdt.core.tests.dom.ASTConverterTest2._test0569(). I removed
intermediate tests relative to the DOM Parser.
Comment 8 Frederic Fusier CLA 2004-10-17 14:38:06 EDT
Obsolete comments are not discarded in Parser.checkComment()...
Comment 9 Frederic Fusier CLA 2004-10-18 14:42:40 EDT
Fixed.

Now no javadoc is attached to local class in this peculiar case.

[jdt-core-internal]
Change done in method checkComment() of Parser, CommentRecorderParser and
SourceElementParser.
Test case STConverterTest2.test0569() activated
Comment 10 David Audel CLA 2004-11-03 07:57:17 EST
Verified for 3.1M3 with build I20041102