Bug 83285 - [javadoc] Javadoc reference to constructor of secondary type has no binding / not found by search
Summary: [javadoc] Javadoc reference to constructor of secondary type has no binding /...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.1 M6   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-20 05:23 EST by Markus Keller CLA
Modified: 2005-03-30 15:16 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 Markus Keller CLA 2005-01-20 05:23:47 EST
I20050118-1015

The javadoc reference to constructor C(String) of secondary type C has no
binding and is not found by search.

p/A.java:
package p;

enum A { }

class C {
    /**
     * Defined thru {@link #C(String)}. => wrong warning:
     * Javadoc: The method C(String) is undefined for the type C"  
     */
    private String fGerman;

    public C(String german) {
        fGerman = german;
    }
}
Comment 1 Frederic Fusier CLA 2005-03-01 16:07:01 EST
Not a specific 1.5 bug. Enum can be replaced by class A and it fails the same...
Comment 2 Frederic Fusier CLA 2005-03-07 09:21:01 EST
Fixed.

Javadoc parser used main type for implicit reference which was obviously wrong
in this case. That's explain this warning and the fact that Search engine didn't
find it.

Now Javadoc parser stores first type declaration found in parser ast stack and
starts from it to bind the reference. If reference is not found, try to resolve
in enclosing type or as a constructor call instead of a message send.

Also search engine now allows ConstructorLocator to accept message send
reference and verify while resolving if it can be bound to a constructor.

[jdt-core-internal]
Modifications done in SourceElementParser, ContructorLocator, MethodLocator,
JavadocAllocationExpression and JavadocMessageSend.
Test cases added in JavadocBugsTests and JavaSearchJavadocTests
Comment 3 Olivier Thomann CLA 2005-03-30 15:16:41 EST
Verified in I20050330-0500