IntelliJ IDEA comes to rescue. IntelliJ reports no errors.
After some search i noticed that Eclipse has history of this problem, though it was reported for JDK 5 and 6. I am not sure why this happening for JDk 8 as well. Also, as per eclipse bugzilla this bug has already been fixed for eclipse 3.8 but some thing in JDK 8 seems to break their fix or fix is not portable to different version of JDK.