Bug 40276 - Incorrect static method access indication
Summary: Incorrect static method access indication
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M3   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-16 18:33 EDT by Darin Swanson CLA
Modified: 2003-07-21 12:28 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Swanson CLA 2003-07-16 18:33:27 EDT
I have turned on the "Indirect access to static memeber" option for the Java 
compiler.

In CodeCompletionTest in org.eclipse.ui.externaltools.internal.ant.editor.test 
in org.eclipse.ant.tests.ui project we reference two ProjectHelper classes: one 
resolved via imports and one as a fully qualified reference.
The fully qualified reference makes a static method call on line 196.
We get the follow warning:
Severity	Description	Resource	In Folder	Location
	Creation Time
	The static method configureProject(Project, File) from the type 
ProjectHelper should be accessed directly 	CodeCompletionTest.java
	org.eclipse.ant.tests.ui/Ant Editor 
Tests/org/eclipse/ui/externaltools/internal/ant/editor/test	line 196
	July 15, 2003 2:33:24 PM

(sorry about the formatting)
Comment 1 Philipe Mulet CLA 2003-07-21 08:19:08 EDT
Reproduced.
Comment 2 Philipe Mulet CLA 2003-07-21 11:29:22 EDT
Actually, the diagnosis is correct, since it is the superclass which implements 
the targeted method:

org.apache.tools.ant.ProjectHelper
    #configureProject(Project, File)

the subclass #configureProject method doesn't override the same signature 
(extra String argument)

org.eclipse.ant.ui.internal.editor.utils.ProjectHelper
    #configureProject(Project, File, String)

So the diagnosis is actually accurate, but the name collision makes it hard to 
spot.
Comment 3 Darin Swanson CLA 2003-07-21 12:28:13 EDT
Thanks Philippe