Community
Participate
Working Groups
Using 0625, changing the targetted JDK from 1.1 to 1.3 in an ant script changed the declaring class of method invocation and field references. The guilty piece of code is in MessageSend and FieldReference. // and not from Object or implicit static method call. if (binding.declaringClass != this.qualifyingType && !this.qualifyingType.isArrayType() && ((currentScope.environment().options.targetJDK >= CompilerOptions.JDK1_2 && (!receiver.isImplicitThis() || !binding.isStatic()) && binding.declaringClass.id != T_Object) // no change for Object methods || !binding.declaringClass.canBeSeenBy(currentScope))) { this.codegenBinding = currentScope.enclosingSourceType().getUpdatedMethodBinding(binding, (ReferenceBinding) this.qualifyingType); // Post 1.4.0 target, array clone() invocations are qualified with array type // This is handled in array type #clone method binding resolution (see Scope and UpdatedMethodBinding) } We need to investigate the behavior of JDK1.3 when you set the target to be 1.3 instead of 1.1.
javac 1.3 has the behavior. If the target JDK is set to 1.3 then there is a side-effect on the declaring class of method invocation and field reference. So the actual behavior of the batch compiler is perfectly acceptable. Close as WONTFIX.