Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 83691

Summary: [javadoc] unresolved reference to constructor
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P5 CC: frederic_fusier
Version: 3.1Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Markus Keller CLA 2005-01-26 04:01:49 EST
I20050118-1015 + jdt.core v_532b

Javadoc references to a constructor of a nested or secondary type are not always
resolved. Here are two examples with missing bindings and wrong warning:

/**
 * @see #A(int)
 * @see A#A(int)
 * @see #test()
 */
public class A {
	public A(int i) {}
	public void test() {}
	
	/**
	 * @see #InnerA(int)
	 *        - warning: Javadoc: The method InnerA(int) is undefined for the type
A.InnerA
	 *        - MethodRef has no binding
	 * @see InnerA#InnerA(int)
	 * @see #testIA()
	 */
	class InnerA {
		public InnerA(int i) {}
		public void testIA() {}
	}
}

/**
 * @see #Second(int)
 *        - warning: Javadoc: The method Second(int) is undefined for the type
Second
 *        - MethodRef has no binding
 * @see Second#Second(int)
 * @see #test2()
 */
class Second {
	public Second(int i) {}
	public void test2() {}
}
Comment 1 Frederic Fusier CLA 2005-03-14 13:29:13 EST
Note that javadoc.exe (wrongly) complains about InnerA both constructor references:
D:\usr\OTI\workspaces\tests\bugs\Divers15\b83691\A.java:16: warning - Tag @see:
can't find InnerA(int) in A.InnerA
D:\usr\OTI\workspaces\tests\bugs\Divers15\b83691\A.java:16: warning - Tag @see:
can't find InnerA(int) in A.InnerA

That means that it fails both on:
	 * @see #InnerA(int)
	 * @see InnerA#InnerA(int)
Comment 2 Frederic Fusier CLA 2005-03-14 14:54:20 EST
If time permit
Comment 3 Frederic Fusier CLA 2005-04-25 11:34:25 EDT
Defer
Comment 4 Frederic Fusier CLA 2005-08-05 04:46:09 EDT
Reopen for 3.2
Comment 5 Frederic Fusier CLA 2006-04-12 14:01:19 EDT
(In reply to comment #1)
> Note that javadoc.exe (wrongly) complains about InnerA both constructor
> references:
> D:\usr\OTI\workspaces\tests\bugs\Divers15\b83691\A.java:16: warning - Tag @see:
> can't find InnerA(int) in A.InnerA
> D:\usr\OTI\workspaces\tests\bugs\Divers15\b83691\A.java:16: warning - Tag @see:
> can't find InnerA(int) in A.InnerA
> 
> That means that it fails both on:
>          * @see #InnerA(int)
>          * @see InnerA#InnerA(int)
> 

These javadoc errors are due to invalid inner clas constructor references.
It should have been writtent #A.InnerA(int) instead (see bug 96237)
Comment 6 Frederic Fusier CLA 2006-04-12 14:02:25 EDT
So, problem here is only with secondary type constructor
=> defer as not critical
Comment 7 Frederic Fusier CLA 2007-04-02 09:40:56 EDT
(In reply to comment #6)
> So, problem here is only with secondary type constructor
> => defer as not critical
> 
There's an unexpected warning for both classes A and Second, so previous assumption was wrong, the problem is not with secondary type constructor but with the unqualified constructor reference.

Note that javadoc tool does no longer report any warning (I've tried 1.3.1, 1.4.2 and 1.5.0 latest version)...
Comment 8 Frederic Fusier CLA 2007-06-21 11:03:45 EDT
Reopen as LATER is deprecated...
Comment 9 Frederic Fusier CLA 2008-09-04 12:13:47 EDT
Ownership has changed for the javadoc comments bugs, but I surely will not have enough time to fix your bug during the 3.5 development process, hence set its priority to P5.
Please provide a patch if you definitely need the bug to be fixed in this
version and I'll have a look at it...
TIA
Comment 10 Eclipse Genie CLA 2020-01-29 00:02:59 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.