使用kafka(或一般的scala?)时​​声纳扫描异常

Exception from sonarqube scan when using using kafka (or scala in general?)

我有一个使用 kafka 的 java 项目。我用 sonarqube 5.0(sonar maven 插件 2.5)扫描它,我得到这个:

[INFO] [13:48:22.488] Sensor JavaSquidSensor...
[INFO] [13:48:22.511] Java Main Files AST scan...
[INFO] [13:48:22.512] 8 source files to be analyzed
[ERROR] [13:48:22.655] Class not found: scala.Predef$$less
[ERROR] [13:48:22.655] Class not found: scala.Predef$$less$colon
[ERROR] [13:48:22.680] Class not found: scala.collection.immutable.Stream$$hash
[ERROR] [13:48:22.680] Class not found: scala.collection.immutable.Stream$$hash$colon
[ERROR] [13:48:22.685] Unable to create symbol table for : /path/to/KafkaNotifier.java
java.lang.IllegalStateException: Innerclass: colon and classSymbol: Stream are not the same.
    at com.google.common.base.Preconditions.checkState(Preconditions.java:145) ~[sonar-batch-maven-compat-5.0.jar:na]
    at org.sonar.java.resolve.BytecodeVisitor.defineInnerClass(BytecodeVisitor.java:162) ~[java-squid-2.9.1.jar:na]
    at org.sonar.java.resolve.BytecodeVisitor.visitInnerClass(BytecodeVisitor.java:144) ~[java-squid-2.9.1.jar:na]
    at org.objectweb.asm.ClassReader.accept(ClassReader.java:679) ~[asm-debug-all-5.0.3.jar:5.0.3]
    at org.objectweb.asm.ClassReader.accept(ClassReader.java:506) ~[asm-debug-all-5.0.3.jar:5.0.3]
    at org.sonar.java.resolve.BytecodeCompleter.complete(BytecodeCompleter.java:100) ~[java-squid-2.9.1.jar:na]
    at org.sonar.java.resolve.Symbol.complete(Symbol.java:98) ~[java-squid-2.9.1.jar:na]
    at org.sonar.java.resolve.BytecodeVisitor$ReadType.visitEnd(BytecodeVisitor.java:541) ~[java-squid-2.9.1.jar:na]
...lots more ommitted

我为每个使用 kafka 的 class 得到这个。

我缺少配置吗?

这是乌贼虫吗?

在我看来,您遇到了报告的字节码加载程序错误:http://jira.codehaus.org/browse/SONARJAVA-805

在 Scala 上工作时触发更多,它会产生很多名称中带有 $ 的 类。