Community
Participate
Working Groups
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; } }
Not a specific 1.5 bug. Enum can be replaced by class A and it fails the same...
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
Verified in I20050330-0500