Summary: | [navigation] Static overrides are not really overrides | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Michael Valenta <Michael.Valenta> |
Component: | UI | Assignee: | Tobias Widmer <tobias_widmer> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | daniel_megert, dirk_baeumer |
Version: | 3.0 | ||
Target Milestone: | 3.2 RC1 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Michael Valenta
2004-10-21 10:07:09 EDT
IMO code assist should still offer the method, but we should not state the we override. Hoewever show the green triangle in this case is a bug. I'm using the methods from JDT UI to show the triangle. The override decorator has the same problem. The bug is much funnier: The method created is not the static method, but just a randomly chosen overridable method. e.g finalize() (see example). To simply choose one doesn't make sense. Tobias, can you fix that? But the real bug is that jdt.core offers the override code assist proposal here. Creating a static method with the same signature as a method from a super type just asks for trouble. I filed bug 97208. The ovreride indicator seem to work correctly, Dani. public class B extends A { @Override protected void finalize() throws Throwable { // TODO Auto-generated method stub super.finalize(); } } class A { public static void staticM() { } } Bug is fixed by fix for bug 97208. Other issues are fixed by bug 120659 |