Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Duplicate
Assignee
Alexey Kudravtsev
Subsystem
Code Analysis. Inspection
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   Nick Darcy
    3 years ago (30 May 2008 21:34)
  • Updated by   Nick Darcy
    2 years ago (20 Feb 2009 13:12)
  • Jira: IDEA-18276
    (history, comments)
 
IDEA-18276 @Override annotation for interface methods in a project language level 5.0
3
Issue is visible to: All Users
  The issue is visible to the selected user group only
I am working on a project which uses a JDK 5. I have set the project level language to 5.

I am allowed to use the @Override annotation as expected on methods that override methods in super classes.

However, I am also allowed to use the annotation on methods that implement methods from interfaces.

This is a java 6 feature and will not compile against java 5.

I think there should be a new project language level 6 which allows @Override on interfaces and I think an error should be shown in the editor if you use it when you have a language level of 5 set.

Also, it would be nice if you have a project level language of 6 set for the @Override annotations to be added automatically (or with a check box) when doing a ctrl i on a class that implements an interface (much as you get for a ctrl o).

Environment: Ubuntu 6.10, jdk 5.11

Issue was resolved
Comments (1)
 
History
 
Linked Issues (?)
 
Alexey Kudravtsev
  Alexey Kudravtsev
03 Sep 2008 17:53
3 years ago