interesting issue about @Override with interface

Just got interesting issue with compiling class file with `@Override` annotation on method which implements interface method. I tried to set up [moquette project][1] in eclipse and got compile error Description Resource Path Location Type The method decodable(IoSession, IoBuffer) of type PubAckDecoder must override a superclass method /moquette-parser/src/main/java/org/dna/mqtt/moquette/proto line 22 Java Problem That seems correct as java 1.5 compliance level is used. However this project is successfully built with maven! That is strange for me. There is following argument file which is used for javac compiler: "-d" "E:/workspaces/mqtt/moquette-mqtt/parser/target/classes" "-classpath" "E:/workspaces/mqtt/moquette-mqtt/parser/target/classes;e:/_mavenRepository/org/apache/mina/mina-core/2.0.4/mina-core-2.0.4.jar;e:/_mavenRepository/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar;e:/_mavenRepository/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4.jar;e:/_mavenRepository/log4j/log4j/1.2.16/log4j-1.2.16.jar;" "E:/workspaces/mqtt/moquette-mqtt/parser/src/main/java/org/dna/mqtt/moquette/proto/" "-g" "-nowarn" "-target" "1.5" "-source" "1.5" "-encoding" "UTF-8" I removed all other source files and left just `PubAckDecoder` which contains the error. What am I missing? Why it is built with maven when it should not? **UPD** Maven configuration for compiler plugin: org.apache.maven.plugins maven-compiler-plugin true 1.5 1.5 [1]:
Well what source version is Maven using to build it?

以上就是interesting issue about @Override with interface的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准