Bug 102933 - problem with Object arrays and clone() with 1.4 .class compatibility
Summary: problem with Object arrays and clone() with 1.4 .class compatibility
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.5.0M2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.5.0 M4   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-06 16:20 EDT by Mike Menu CLA
Modified: 2005-09-27 11:11 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Menu CLA 2005-07-06 16:20:01 EDT
environment
- eclipse AspectJ project using jdk 1.42_0
- JDK 'generated .class compatibility' set to 1.4 (under JDK->compiler-
>Compliance and class files).  I did this because I wanted to use JDK 1.4 
assertions.

sample project includes one class:

package com.test;

public class Foo {

    public void test() {
        Foo[] array = new Foo[0];
        Foo[] arrayClone = (Foo[])array.clone();
    }
}

and one aspect:

package com.test;

aspect MyAspect {
    declare warning: call(* *(..)) :
	       "a call within foo";
}

When I build this project, I get an error on the Foo java file telling me that 
it 'can't find com.test.Foo type' with no line numbers.

When I change the JDK 'generated .class compatibility' set to 1.3 everything 
compiles fine..
Comment 1 Adrian Colyer CLA 2005-08-26 11:33:26 EDT
clone on an array has special treatment in bytecode, marking for investigation in M4
Comment 2 Adrian Colyer CLA 2005-09-27 11:11:31 EDT
This is fixed in the current aspectj builds. I've added tests at the -1.3, -1.4,
and -1.5 levels and we compile as expected in all cases.