Details
Description
I have a class with a dollar $ in its name (this is allowed according to http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625). Squid treats it as an inner class (which it is not) and displays:
java.lang.IllegalArgumentException: Java inner classes are not supported : pack.Name$Test
at org.sonar.api.resources.JavaFile.<init>(JavaFile.java:93)
at org.sonar.api.resources.JavaFile.<init>(JavaFile.java:80)
at org.sonar.api.batch.SquidUtils.convertJavaFileKeyFromSquidFormat(SquidUtils.java:45)
at org.sonar.plugins.squid.bridges.ResourceIndex.loadSquidFiles(ResourceIndex.java:62)
at org.sonar.plugins.squid.bridges.ResourceIndex.loadSquidResources(ResourceIndex.java:42)
at org.sonar.plugins.squid.SquidExecutor.save(SquidExecutor.java:96)
at org.sonar.plugins.squid.SquidSensor.analyse(SquidSensor.java:82)
Issue Links
- is duplicated by
-
SONAR-2026
Squid extraction fails in inner class : java.lang.IllegalArgumentException: Java inner classes are not supported
-
- is related to
-
SONAR-2677
JUnit tests containing several level of nested inner classes can't be analysed by Sonar
-
I attached a sample project which will show the issue when running 'mvn sonar:sonar'