Bug 233187

Summary: [javadoc] partially qualified inner types should be warned
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: david_audel
Version: 3.4   
Target Milestone: 3.5 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
[proposed patch + test case] on top v_866
none
Updated patch on top of v_912 none

Description Frederic Fusier CLA 2008-05-21 06:38:44 EDT
Using I20080520-2000.

While reviewing patch for bug 228648, I compiled some test cases got from initial bug 195374 and realized that inner type with partial qualification are still not warned when compliance is 1.3 or 1.4 although the javadoc tool complains about these references.

Here's the test case I use:
package test.bug;

public class X {
    public static class Y {
        public static class Z {
            /**
             * The position in the new method signature depends on
             * the position in the array passed to
             * {@link X.Y#foo(Y.Z[])}
             * {@link test.bug.X.Y#foo(Y.Z[])}
             */
            public int bar() {
                return 0;
            }
        }

        public void foo(Z[] params) {
        }
    }
}

JDT compiler does not complain about it whatever the compliance is.

Javadoc tool complains on 1.3.1 and 1.4.2:
X.java:12: warning - Tag @link: can't find foo(Y.Z[]) in test.bug.X.Y
X.java:12: warning - Tag @link: can't find foo(Y.Z[]) in test.bug.X.Y
X.java:12: warning - Tag @link: can't find foo(Y.Z[]) in test.bug.X.Y
X.java:12: warning - Tag @link: can't find foo(Y.Z[]) in test.bug.X.Y
X.java:12: warning - Tag @link: can't find foo(Y.Z[]) in test.bug.X.Y
X.java:12: warning - Tag @link: can't find foo(Y.Z[]) in test.bug.X.Y
X.java:12: warning - Tag @link: can't find foo(Y.Z[]) in test.bug.X.Y
X.java:12: warning - Tag @link: can't find foo(Y.Z[]) in test.bug.X.Y
X.java:12: warning - Tag @link: can't find foo(Y.Z[]) in test.bug.X.Y
X.java:12: warning - Tag @link: can't find foo(Y.Z[]) in test.bug.X.Y
10 warnings
Comment 1 Eric Jodet CLA 2008-05-21 06:53:00 EDT
sounds like a duplicate of bug 221539 where partially qualified references within the same package / compilation unit are not warned (though the javadoc tool complains about unresolved references)
(agreed: initial fix for bug 195374 only fixed the single type reference case)
Comment 2 Eric Jodet CLA 2008-05-21 08:12:25 EDT
(In reply to comment #1)
in fact not a dup of bug 221539, which deals with type references.
Here, we fail to warn partially qualified references in JavadocArgumentExpression.

So, as per bug 195374, the same fix should be applied, both in:
Javadoc#verifyTypeReference(...) --> bug 221539 (patch in bug 222188)
JavadocArgumentExpression#internalResolveType(...) --> this bug

Not a regression. 
Comment 3 Eric Jodet CLA 2008-05-22 03:24:50 EDT
(In reply to comment #1)
similar to bug 195374 (as related to inner types qualification) but not a real duplicate.
Also not that the javadoc tool raises warnings (though fewer) at 1.5 or 1.6 level:

X.java:12: warning - Tag @link: can't find foo(Y.Z[]) in test.bug.X.Y
X.java:12: warning - Tag @link: can't find foo(Y.Z[]) in test.bug.X.Y

We should modify the abstract accordingly.
Comment 4 Eric Jodet CLA 2008-05-22 06:57:19 EDT
Created attachment 101465 [details]
[proposed patch + test case] on top v_866
Comment 5 Frederic Fusier CLA 2008-09-11 12:34:53 EDT
Created attachment 112322 [details]
Updated patch on top of v_912

Fix a little bit tuned to avoid unnecessary message send.
Comment 6 Frederic Fusier CLA 2008-09-11 12:37:34 EDT
Released for 3.5M2
Comment 7 David Audel CLA 2008-09-15 07:36:16 EDT
Verified for 3.5M2 using I20080914-2000