I am using JRE 1.6 version and aware of JRE 1.5 trouble while using @Override
with interface.
I imported a new project (Spring + Maven ) and Eclipse giving error on every @Override
annotation whenever any interface method is overridden.
Things I tried till now
- Checked project and workspace specific JRE and compliance level, It is set to 1.6 version.
- Checked JRE library on build path, it is also same.
- Changed Java version in project facet to 1.6 (Dont know if it will help)
- Did Maven clean and install (hundred times till now)
- Disabled error / warning for Annotations still no luck
- Eclipse restart (Stupid thing but helps me lots of time)
- Last option will be deleting all .setting and .project files if I dont get anything else to try.
Edit 1:
I am getting following error
The method XXX of type XXX must override a superclass method.
Edit 2:
Code Sample
Interface declaration
public interface HelperService {
public RequisitionTypeDTO getRequisitionTypeDTO(int id) throws Exception;
}
Implementation:
@Service
public class HelperServiceImpl implements HelperService{
@Override // Getting error for this line
public RequisitionTypeDTO getRequisitionTypeDTO(int id) throws Exception{
// Bla Bla Bla
}
}
EDIT 3:
I am able to build and run my application successfully irrespective of this errors. Just not happy with red error flags all over the source code.