Summary: | [1.5][compiler] Compiler warning "tagged with @Override" not correct with static methods | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Sebastian Davids <sdavids> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | akiezun |
Version: | 3.1 | ||
Target Milestone: | 3.1 M7 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Sebastian Davids
2005-04-03 08:03:05 EDT
Version: 3.1.0 Build id: I20050401-1645 Added AnnotationTest#test123-124. Fixed, by turning off complaining in presence of static method. does this also take care of the folowing? public class Foo { static void foo(){} } class Bar extends Foo{ @Override //should be an error (bug in 3.1M6) static void foo(){} } We do not complain on latter case, and javac agrees with us. Added AnnotationTest#tes140 am I correct that it is a bug (in both eclipse and javac)? @Override is not very strictly spec'ed... so one could say it is a matter of interpretation. If you feel it is bad, please enter a separate defect about your latter issue, for later investigating. For current time being, there are other more critical issues; and given our behavior seems to match others expectation... will do. i understand it's not high prio though. @Override javadoc says "Indicates that a method declaration is intended to override a method declaration in a superclass." And method overriding (jls3 8.4.8.1) says that overriding only applies to instance methods. Verified in I20050510-0010 |