Bug 173978 - [plan] [weaving] Missing LocalVariableTable for methods adviced by around execution.
Summary: [plan] [weaving] Missing LocalVariableTable for methods adviced by around exe...
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.5.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.6.3   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 173977 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-13 04:24 EST by NAKAGUCHI Takao CLA
Modified: 2008-10-30 11:47 EDT (History)
1 user (show)

See Also:


Attachments
sources, bat files and logs (3.46 KB, application/zip)
2007-02-13 04:25 EST, NAKAGUCHI Takao CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description NAKAGUCHI Takao CLA 2007-02-13 04:24:30 EST
LocalVariableTable is missing for methods adviced by around execution though that is generated for before execution.
So softwares those get method parameter information from class files (such as java2wsdl or eclipse ide) can't get the information.


Here is the class which has method advied by two aspects.

public class Test{
	public void sayHello(String message){
		System.out.println(message);
	}
}

The aspect(1) which contains "around execution".

public aspect TestAroundAspect{
	void around(): execution(void Test.sayHello(String)){
		proceed();
	}
}

The aspect(2) which contains "before execution".

public aspect TestBeforeAspect{
	before(): execution(void Test.sayHello(String)){
	}
}

And here are the results generated by ajc and javap.

javap results for (1):
Compiled from "Test.java"
public class Test extends java.lang.Object{
public Test();
  LineNumberTable: 
   line 1: 0
  LocalVariableTable: 
   Start  Length  Slot  Name   Signature
   0      5      0    this       LTest;

public void sayHello(java.lang.String);
  LineNumberTable: 
   line 1: 0

}

javap results for (2):

Compiled from "Test.java"
public class Test extends java.lang.Object{
public Test();
  LineNumberTable: 
   line 1: 0
  LocalVariableTable: 
   Start  Length  Slot  Name   Signature
   0      5      0    this       LTest;

public void sayHello(java.lang.String);
  LineNumberTable: 
   line 8: 0
   line 9: 13
  LocalVariableTable: 
   Start  Length  Slot  Name   Signature
   6      8      0    this       LTest;
   6      8      1    message       Ljava/lang/String;

}
Comment 1 NAKAGUCHI Takao CLA 2007-02-13 04:25:40 EST
Created attachment 58839 [details]
sources, bat files and logs

bat files need environment variables JAVA_HOME and ASPECTJ_HOME to run.
Comment 2 NAKAGUCHI Takao CLA 2007-02-13 04:31:08 EST
*** Bug 173977 has been marked as a duplicate of this bug. ***
Comment 3 Andrew Clement CLA 2007-10-26 06:31:16 EDT
quick look for 1.5.4, might get punted to 1.6.0
Comment 4 Andrew Clement CLA 2008-10-30 11:47:44 EDT
test and fix committed.  Simplest way was to allow LazyMethodGen to recognize that it has encountered an method that no longer has a local variable table and  constructs it.