Bug 208010 - [compiler] Compiler reports unneccessary warning for static members
Summary: [compiler] Compiler reports unneccessary warning for static members
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-30 10:56 EDT by Dani Megert CLA
Modified: 2008-04-29 07:11 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2007-10-30 10:56:14 EDT
I20071030-0010.

Enable "Method overridden but not package visible:" i.e. COMPILER_PB_OVERRIDING_PACKAGE_DEFAULT_METHOD (is enabled by default).

In case of shadowed static methods I don't see any advantage of getting the following problem reported:

The method YYY.bar() does not override the inherited method from XXX since it is private to a different package	P/src/foo

A static method always shadows the one from the super class even if both are declared as public - in which case no warning is reported.

Test Case:
--- %< ---
package bar;
public class XXX {
	static void foo() {
	}
}
--- %< ---
package foo;
public class YYY extends bar.XXX {
	static void foo() { // WARNING HERE
	}
}
Comment 1 Dani Megert CLA 2007-12-11 04:09:36 EST
Any update on this one? This causes a compile warning that gets reported on each Eclipse build. I'd like this list to be as small as possible.

See:
http://eclipsebuildserv.ottawa.ibm.com/downloads/master/downloads/drops/I20071210-1800/compilelogs/plugins/org.eclipse.ui.presentations.r21_3.2.100.I20071031-0010/@dot.bin.html
Comment 2 Olivier Thomann CLA 2007-12-11 08:36:07 EST
As far as I know this has already been addressed by Kent.
Comment 3 Dani Megert CLA 2007-12-11 08:47:07 EST
>As far as I know this has already been addressed by Kent.
You mean he works on this and hasn't committed the code? Observe that the warning is in I20071210-1800.
Comment 4 Olivier Thomann CLA 2007-12-11 08:51:35 EST
The Eclipse builds are not using the compiler from the latest build. They use the compiler version from the latest milestone.
Kim, does this have been changed ?
Comment 5 Dani Megert CLA 2007-12-11 08:55:59 EST
Tested with test case from comment 0 using I20071211-0010. This seems to be fixed indeed.
Comment 6 Kim Moir CLA 2007-12-11 09:06:11 EST
I only update the builder with the plugins from every milestone unless I get a request to do so to address a particular bug fix.  So you're asking me to use the latest version of jdt.core in the builder for the next builds toward M4?

Comment 7 Dani Megert CLA 2007-12-11 09:10:00 EST
It's not critical. I would proceed as usual.
Comment 8 Dani Megert CLA 2007-12-19 05:22:39 EST
Kent, is there some more work planned on this one? It seems to be fixed in 3.4 M4.
Comment 9 Kent Johnson CLA 2008-04-22 12:02:15 EDT
This was fixed a while ago.

Added MethodVerifyTest.test160

Released for 3.4M7
Comment 10 David Audel CLA 2008-04-29 07:11:56 EDT
Verified for 3.4M7 using I20080427-2000