Bug 376990 - iajc does not support source compliance level 1.7
Summary: iajc does not support source compliance level 1.7
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Ant (show other bugs)
Version: 1.7.0   Edit
Hardware: PC Windows 7
: P2 critical (vote)
Target Milestone: 1.7.0   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-17 11:35 EDT by Doug Van Watermulen CLA
Modified: 2012-04-18 17:18 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Van Watermulen CLA 2012-04-17 11:35:31 EDT
Build Identifier: Version: 3.7.2 Build id: M20120208-0800

I am using AspectJ 1.7.0.M1. I changed the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows:

<iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}"

When I run this using 'ant bean' I get the following line:
[iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136:

I have tried running the compiler 'ajc' directly specifying -source 1.7 and that works.

I am trying to use this on a large development project that uses AspectJ and has been migrated over to Java 7. The project uses ant to do builds so it is critical that iajc support 1.7. The project can't be built if any Java 7 features are used in the source files which defeats the whole purpose of moving to Java 7.

Reproducible: Always

Steps to Reproduce:
1.Change the examples build.xml to use a source compliance level of 1.7 and verbose=true as follows:

<iajc destdir="${classes.dir}" verbose="true" source="1.7" argfiles="${list}"


2.Run using 'ant bean' I get the following line:
[iajc] ignored: -source 1.7 at E:\aspectj1.7\doc\examples\build.xml:136:
Comment 1 Andrew Clement CLA 2012-04-17 12:44:55 EDT
good catch !

I've just fixed it and uploaded a new dev build.  On downloads page, or here:
http://www.eclipse.org/downloads/download.php?file=/tools/aspectj/dev/aspectj-DEVELOPMENT-20120417094200.jar
Comment 2 Doug Van Watermulen CLA 2012-04-18 14:54:42 EDT
(In reply to comment #1)
> good catch !
> 
> I've just fixed it and uploaded a new dev build.  On downloads page, or here:
> http://www.eclipse.org/downloads/download.php?file=/tools/aspectj/dev/aspectj-DEVELOPMENT-20120417094200.jar

Thanks for the quick response. I tried that build and I'm now seeing 
    [copy] Copying 1 file to E:\javadev\indigo\workspace\codeStage9_0\build\classes\META-INF
     [java] java.lang.VerifyError: Expecting a stackmap frame at branch target 15 in method xxxxxxxxxx.main([Ljava/lang/String;)V at offset 0

     [java]     at java.lang.Class.getDeclaredMethods0(Native Method)
     [java]     at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
     [java]     at java.lang.Class.getMethod0(Class.java:2685)
     [java]     at java.lang.Class.getMethod(Class.java:1620)
     [java]     at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:488)
     [java]     at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:480)
     [java] Exception in thread "main"
     [java] Java Result: 1

The xxxxxxxxxx has been edited in by me due to security concerns.
Does this build have 'Bug 353467 - VerifyError: Expecting a stackmap frame' fixed in it?
Comment 3 Andrew Clement CLA 2012-04-18 17:18:08 EDT
sorry about that.  A change last week to prevent asm damaging the constant pool had a side effect of damaging the creation of stackmap attributes.  Yesterday I just checked compilation succeeded and didn't have a 1.7 vm in order to run the result.

I've patched it all up and todays dev build:

http://www.eclipse.org/downloads/download.php?file=/tools/aspectj/dev/aspectj-DEVELOPMENT-20120418141500.jar

definetly compiles and runs (with stackmap)