Community
Participate
Working Groups
Build Identifier: The code that I compile by using Maven or Netbeans throw java.lang.IllegalStateException: Can't ask to parameterize a member of non-generic type. look at simple example in attachment (test.zip) - test.zip contains 2 identical projects in different named directories. - throwing the exception depends on the path to java classes of these projects. - dir c:\test\ok is compiled without any problems - dir c:\test\fail1 is compiled with java.lang.IllegalStateException in output file (ajcore.XXX.txt) - if you remove "1" from fail1 (c:\test\fail1 => c:\test\fail) it will compile without any problems - if you remove public override method in class ChildTest$ChildInnerTest it will compile without any problems this bug is simillar to: https://bugs.eclipse.org/bugs/show_bug.cgi?id=298675 Reproducible: Always Steps to Reproduce: 1. unpack test.zip to C:\ 2. run build.bat in C:\test\fail1 (requirements: Apache Maven)
Created attachment 190831 [details] test projects
Created attachment 190832 [details] aspectj output file
simple example in attachment (test.zip) correction: - if you remove "fail" from fail1 (c:\test\fail1 => c:\test\1) it will compile without any problems
I recreated it pretty quickly (thanks for the testcode), but then I observed that the line numbers didn't tie up with recent AspectJ builds. I then looked at the ajcore file you attached, and it says: AspectJ Compiler 1.6.2 built on Saturday Oct 4, 2008 at 05:47:07 GMT Although your pom expressed a 1.6.10 dependency, that was only onto the runtime, it didn't determine the level of compiler that would be used. I changed the pom slightly (new dependencies in the aspectj-maven-plugin section, and up'd the version of the plugin to 1.2): <groupId>org.codehaus.mojo</groupId> <artifactId>aspectj-maven-plugin</artifactId> <version>1.2</version> // this is a change // this bit is new... <dependencies> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjrt</artifactId> <version>1.6.10</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjtools</artifactId> <version>1.6.10</version> </dependency> </dependencies> // ... down to here <configuration> <source>1.6</source> <complianceLevel>1.6</complianceLevel> </configuration> <executions> <execution> <goals> <goal>compile</goal> <!-- use this goal to weave all your main classes --> <!--<goal>test-compile</goal> use this goal to weave all your test classes --> </goals> </execution> </executions> </plugin> with those changes, the build now runs clean using 1.6.10. After playing with versions looks like this issue was fixed in the 1.6.8 timeframe.