java - Annotations "not applicable to type" -


i quite new intellij being eclipse user many years, find error annotations expect @override showing error "not applicable type"

e.g @postconstruct annotation jboss errai showing errors around, import there no error @ all.

how fix this?

update:

e.g

@postconstruct // when hovered mouse pointer '@postcontruct' not applicable method public void init() { } 

screenshot: http://snag.gy/q5cw5.jpg

looking @ definition, 1 sees @target mentioning method. might have imported totally different postconstruct annotation. inspect imports / go definition in intellij.

package javax.annotation;  @documented @retention(value=runtime) @target(value=method) public @interface postconstruct 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -