Sebastian Thomschke
IT Freelancer – Java, J2EE, IBM WebSphere Portal, Lotus Notes/Domino
-
Sun JDK5/6 compilers broken when linking overloaded methods with variable arguments
We are currently switching the build system of OVal from custom Ant scripts to Maven 2. During that process we accidentally compiled the project using the Java compiler of the Sun JDK 5 instead of the AspectJ compiler. Surprisingly javac did not complain about the missing aspect class files. Instead it already aborted while compiling an ordinary Java class which only referenced other non-AspectJ related classes. This is the original error message:
[INFO] [compiler:compile] [INFO] Compiling 180 source files to C:\projects\oval\src\trunk\target\classes [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure C:\projects\oval\src\trunk\src\main\java\net\sf\oval\Validator.java:[373,58] addMethodParameterChecks(java.lang.reflect.Method,int,java.lang.Object) has private access in net.sf.oval.internal.ClassChecks
There exist multiple methods named addMethodParameterChecks in the class ClassChecks with different signatures. The problem is that javac tries to link against the wrong method when compiling the class calling one of the methods.


Looking for a high performer for your next IT project?

English
Deutsch
Recent Comments