issue_id
int64 2.04k
425k
| title
stringlengths 9
251
| body
stringlengths 4
32.8k
⌀ | status
stringclasses 6
values | after_fix_sha
stringlengths 7
7
| project_name
stringclasses 6
values | repo_url
stringclasses 6
values | repo_name
stringclasses 6
values | language
stringclasses 1
value | issue_url
null | before_fix_sha
null | pull_url
null | commit_datetime
timestamp[us, tz=UTC] | report_datetime
timestamp[us, tz=UTC] | updated_file
stringlengths 23
187
| chunk_content
stringlengths 1
22k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
alter("P1","inc3");
build("P1");
checkWasntFullBuild();
ajs = IncrementalStateManager.findStateManagingOutputLocation(new File(getFile("P1","bin")));
assertTrue("There should be state for project P1",ajs!=null);
checkWasntFullBuild();
assertTrue("Should be one structural changes as it was a full build but found: "+
ajs.getNumberOfStructuralChangesSinceLastFullBuild(),
ajs.getNumberOfStructuralChangesSinceLastFullBuild()==1);
}
/**
* Complex. Here we are testing that a state object records structural changes since
* the last full build correctly. We build a simple project from scratch - this will
* be a full build and so the structural changes since last build count should be 0.
* We then alter a class, changing body of a method, not the structure and
* check struc changes is still 0.
*/
public void testStateManagement2() {
File binDirectoryForP1 = new File(getFile("P1","bin"));
initialiseProject("P1");
alter("P1","inc3");
build("P1");
AjState ajs = IncrementalStateManager.findStateManagingOutputLocation(binDirectoryForP1);
assertTrue("There should be state for project P1",ajs!=null);
assertTrue("Should be no struc changes as its a full build: "+
ajs.getNumberOfStructuralChangesSinceLastFullBuild(),
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
ajs.getNumberOfStructuralChangesSinceLastFullBuild()==0);
alter("P1","inc4");
build("P1");
checkWasntFullBuild();
ajs = IncrementalStateManager.findStateManagingOutputLocation(new File(getFile("P1","bin")));
assertTrue("There should be state for project P1",ajs!=null);
checkWasntFullBuild();
assertTrue("Shouldn't be any structural changes but there were "+
ajs.getNumberOfStructuralChangesSinceLastFullBuild(),
ajs.getNumberOfStructuralChangesSinceLastFullBuild()==0);
}
/**
* The C.java file modified in this test has an inner class - this means the inner class
* has a this$0 field and <init>(C) ctor to watch out for when checking for structural changes
*
*/
public void testStateManagement3() {
File binDirForInterproject1 = new File(getFile("interprojectdeps1","bin"));
initialiseProject("interprojectdeps1");
build("interprojectdeps1");
AjState ajs = IncrementalStateManager.findStateManagingOutputLocation(binDirForInterproject1);
assertTrue("There should be state for project P1",ajs!=null);
assertTrue("Should be no struc changes as its a full build: "+
ajs.getNumberOfStructuralChangesSinceLastFullBuild(),
ajs.getNumberOfStructuralChangesSinceLastFullBuild()==0);
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
alter("interprojectdeps1","inc1");
build("interprojectdeps1");
checkWasntFullBuild();
ajs = IncrementalStateManager.findStateManagingOutputLocation(new File(getFile("interprojectdeps1","bin")));
assertTrue("There should be state for project interprojectdeps1",ajs!=null);
checkWasntFullBuild();
assertTrue("Shouldn't be any structural changes but there were "+
ajs.getNumberOfStructuralChangesSinceLastFullBuild(),
ajs.getNumberOfStructuralChangesSinceLastFullBuild()==0);
}
/**
* The C.java file modified in this test has an inner class - which has two ctors - this checks
* how they are mangled with an instance of C.
*
*/
public void testStateManagement4() {
File binDirForInterproject2 = new File(getFile("interprojectdeps2","bin"));
initialiseProject("interprojectdeps2");
build("interprojectdeps2");
AjState ajs = IncrementalStateManager.findStateManagingOutputLocation(binDirForInterproject2);
assertTrue("There should be state for project interprojectdeps2",ajs!=null);
assertTrue("Should be no struc changes as its a full build: "+
ajs.getNumberOfStructuralChangesSinceLastFullBuild(),
ajs.getNumberOfStructuralChangesSinceLastFullBuild()==0);
alter("interprojectdeps2","inc1");
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
build("interprojectdeps2");
checkWasntFullBuild();
ajs = IncrementalStateManager.findStateManagingOutputLocation(new File(getFile("interprojectdeps2","bin")));
assertTrue("There should be state for project interprojectdeps1",ajs!=null);
checkWasntFullBuild();
assertTrue("Shouldn't be any structural changes but there were "+
ajs.getNumberOfStructuralChangesSinceLastFullBuild(),
ajs.getNumberOfStructuralChangesSinceLastFullBuild()==0);
}
/**
* The C.java file modified in this test has an inner class - it has two ctors but
* also a reference to C.this in it - which will give rise to an accessor being
* created in C
*
*/
public void testStateManagement5() {
File binDirForInterproject3 = new File(getFile("interprojectdeps3","bin"));
initialiseProject("interprojectdeps3");
build("interprojectdeps3");
AjState ajs = IncrementalStateManager.findStateManagingOutputLocation(binDirForInterproject3);
assertTrue("There should be state for project interprojectdeps3",ajs!=null);
assertTrue("Should be no struc changes as its a full build: "+
ajs.getNumberOfStructuralChangesSinceLastFullBuild(),
ajs.getNumberOfStructuralChangesSinceLastFullBuild()==0);
alter("interprojectdeps3","inc1");
build("interprojectdeps3");
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
checkWasntFullBuild();
ajs = IncrementalStateManager.findStateManagingOutputLocation(new File(getFile("interprojectdeps3","bin")));
assertTrue("There should be state for project interprojectdeps1",ajs!=null);
checkWasntFullBuild();
assertTrue("Shouldn't be any structural changes but there were "+
ajs.getNumberOfStructuralChangesSinceLastFullBuild(),
ajs.getNumberOfStructuralChangesSinceLastFullBuild()==0);
}
/**
* Now the most complex test. Create a dependancy between two projects. Building
* one may affect whether the other does an incremental or full build. The
* structural information recorded in the state object should be getting used
* to control whether a full build is necessary...
*/
public void testBuildingDependantProjects() {
initialiseProject("P1");
initialiseProject("P2");
configureNewProjectDependency("P2","P1");
build("P1");
build("P2");
alter("P1","inc1");
build("P1");
build("P2");
checkWasntFullBuild();
alter("P1","inc3");
build("P1");
build("P2");
checkWasFullBuild();
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
alter("P1","inc4");
build("P1");
build("P2");
checkWasntFullBuild();
}
public void testPr85132() {
initialiseProject("PR85132");
build("PR85132");
alter("PR85132","inc1");
build("PR85132");
}
public void testPr125405() {
initialiseProject("PR125405");
build("PR125405");
checkCompileWeaveCount(1,1);
alter("PR125405","inc1");
build("PR125405");
checkForError("only abstract aspects can have type parameters");
alter("PR125405","inc2");
build("PR125405");
checkCompileWeaveCount(1,1);
assertTrue("Should be no errors, but got "+MyTaskListManager.getErrorMessages(),MyTaskListManager.getErrorMessages().size()==0);
}
public void testPr128618() {
initialiseProject("PR128618_1");
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
initialiseProject("PR128618_2");
configureNewProjectDependency("PR128618_2","PR128618_1");
assertTrue("there should be no warning messages before we start",
MyTaskListManager.getWarningMessages().isEmpty());
build("PR128618_1");
build("PR128618_2");
List warnings = MyTaskListManager.getWarningMessages();
assertTrue("Should be one warning, but there are #"+warnings.size(),warnings.size()==1);
IMessage msg = (IMessage)(MyTaskListManager.getWarningMessages().get(0));
assertEquals("warning should be against the FFDC.aj resource","FFDC.aj",msg.getSourceLocation().getSourceFile().getName());
alter("PR128618_2","inc1");
build("PR128618_2");
checkWasntFullBuild();
IMessage msg2 = (IMessage)(MyTaskListManager.getWarningMessages().get(0));
assertEquals("warning should be against the FFDC.aj resource","FFDC.aj",msg2.getSourceLocation().getSourceFile().getName());
assertFalse("a new warning message should have been generated", msg.equals(msg2));
}
public void testPr92837() {
initialiseProject("PR92837");
build("PR92837");
alter("PR92837","inc1");
build("PR92837");
}
public void testPr119570() {
initialiseProject("PR119570");
build("PR119570");
assertTrue("Should be no errors, but got "+MyTaskListManager.getErrorMessages(),MyTaskListManager.getErrorMessages().size()==0);
}
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
public void testPr119570_2() {
initialiseProject("PR119570_2");
build("PR119570_2");
List l = MyTaskListManager.getWarningMessages();
assertTrue("Should be no warnings, but got "+l,l.size()==0);
}
public void testPr117209() {
try {
initialiseProject("pr117209");
configureNonStandardCompileOptions("-proceedOnError");
build("pr117209");
checkCompileWeaveCount(6,6);
} finally {
MyBuildOptionsAdapter.reset();
}
}
public void testPr114875() {
initialiseProject("pr114875");
build("pr114875");
alter("pr114875","inc1");
build("pr114875");
checkWasFullBuild();
alter("pr114875","inc2");
build("pr114875");
checkWasFullBuild();
}
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
public void testPr117882() {
initialiseProject("PR117882");
build("PR117882");
checkWasFullBuild();
alter("PR117882","inc1");
build("PR117882");
checkWasFullBuild();
}
public void testPr117882_2() {
initialiseProject("PR117882_2");
build("PR117882_2");
checkWasFullBuild();
alter("PR117882_2","inc1");
build("PR117882_2");
checkWasFullBuild();
}
public void testPr115251() {
initialiseProject("PR115251");
build("PR115251");
checkWasFullBuild();
alter("PR115251","inc1");
build("PR115251");
checkWasFullBuild();
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
}
/**
* Checks we aren't leaking mungers across compiles (accumulating multiple instances of the same one that
* all do the same thing). On the first compile the munger is added late on - so at the time we set
* the count it is still zero. On the subsequent compiles we know about this extra one.
*/
public void testPr141956_IncrementallyCompilingAtAj() {
initialiseProject("PR141956");
build("PR141956");
assertTrue("Should be zero but reports "+EclipseFactory.debug_mungerCount,EclipseFactory.debug_mungerCount==0);
alter("PR141956","inc1");
build("PR141956");
assertTrue("Should be only one but reports "+EclipseFactory.debug_mungerCount,EclipseFactory.debug_mungerCount==1);
alter("PR141956","inc1");
build("PR141956");
assertTrue("Should be only one but reports "+EclipseFactory.debug_mungerCount,EclipseFactory.debug_mungerCount==1);
alter("PR141956","inc1");
build("PR141956");
assertTrue("Should be only one but reports "+EclipseFactory.debug_mungerCount,EclipseFactory.debug_mungerCount==1);
alter("PR141956","inc1");
build("PR141956");
assertTrue("Should be only one but reports "+EclipseFactory.debug_mungerCount,EclipseFactory.debug_mungerCount==1);
}
public void testPr121384() {
MyBuildOptionsAdapter.setNonStandardOptions("-showWeaveInfo");
configureBuildStructureModel(true);
initialiseProject("pr121384");
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
build("pr121384");
checkWasFullBuild();
alter("pr121384","inc1");
build("pr121384");
checkWasntFullBuild();
}
/* public void testPr111779() {
super.VERBOSE=true;
initialiseProject("PR111779");
build("PR111779");
alter("PR111779","inc1");
build("PR111779");
}
*/
public void testPr93310_1() {
initialiseProject("PR93310_1");
build("PR93310_1");
checkWasFullBuild();
String fileC2 = getWorkingDir().getAbsolutePath() + File.separatorChar + "PR93310_1" + File.separatorChar + "src" + File.separatorChar + "pack" + File.separatorChar + "C2.java";
(new File(fileC2)).delete();
alter("PR93310_1","inc1");
build("PR93310_1");
checkWasFullBuild();
int l = AjdeInteractionTestbed.MyStateListener.detectedDeletions.size();
assertTrue("Expected one deleted file to be noticed, but detected: "+l,l==1);
String name = (String)AjdeInteractionTestbed.MyStateListener.detectedDeletions.get(0);
assertTrue("Should end with C2.java but is "+name,name.endsWith("C2.java"));
}
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
public void testPr93310_2() {
initialiseProject("PR93310_2");
build("PR93310_2");
checkWasFullBuild();
String fileC2 = getWorkingDir().getAbsolutePath() + File.separatorChar + "PR93310_2" + File.separatorChar + "src" + File.separatorChar + "pack" + File.separatorChar + "C2.java";
(new File(fileC2)).delete();
alter("PR93310_2","inc1");
build("PR93310_2");
checkWasFullBuild();
int l = AjdeInteractionTestbed.MyStateListener.detectedDeletions.size();
assertTrue("Expected one deleted file to be noticed, but detected: "+l,l==1);
String name = (String)AjdeInteractionTestbed.MyStateListener.detectedDeletions.get(0);
assertTrue("Should end with C2.java but is "+name,name.endsWith("C2.java"));
}
public void testPr113531() {
initialiseProject("PR113531");
build("PR113531");
assertFalse("build should have compiled ok",
MyTaskListManager.hasErrorMessages());
alter("PR113531","inc1");
build("PR113531");
assertEquals("error message should be 'foo cannot be resolved' ",
"foo cannot be resolved",
((IMessage)MyTaskListManager.getErrorMessages().get(0))
.getMessage());
alter("PR113531","inc2");
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
build("PR113531");
assertTrue("There should be no exceptions handled:\n"+MyErrorHandler.getErrorMessages(),
MyErrorHandler.getErrorMessages().isEmpty());
assertEquals("error message should be 'foo cannot be resolved' ",
"foo cannot be resolved",
((IMessage)MyTaskListManager.getErrorMessages().get(0))
.getMessage());
}
public void testPr119882() {
initialiseProject("PR119882");
build("PR119882");
assertFalse("build should have compiled ok",MyTaskListManager.hasErrorMessages());
alter("PR119882","inc1");
build("PR119882");
List errors = MyTaskListManager.getErrorMessages();
assertTrue("Should be at least one error, but got none",errors.size()==1);
assertEquals("error message should be 'i cannot be resolved' ",
"i cannot be resolved",
((IMessage)errors.get(0))
.getMessage());
alter("PR119882","inc2");
build("PR119882");
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
assertTrue("There should be no exceptions handled:\n"+MyErrorHandler.getErrorMessages(),
MyErrorHandler.getErrorMessages().isEmpty());
assertEquals("error message should be 'i cannot be resolved' ",
"i cannot be resolved",
((IMessage)errors.get(0))
.getMessage());
}
public void testPr112736() {
initialiseProject("PR112736");
build("PR112736");
checkWasFullBuild();
String fileC2 = getWorkingDir().getAbsolutePath() + File.separatorChar + "PR112736" + File.separatorChar + "src" + File.separatorChar + "pack" + File.separatorChar + "A.java";
(new File(fileC2)).delete();
alter("PR112736","inc1");
build("PR112736");
checkWasFullBuild();
}
/**
* We have problems with multiple rewrites of a pointcut across incremental builds.
*/
public void testPr113257() {
initialiseProject("PR113257");
build("PR113257");
alter("PR113257","inc1");
build("PR113257");
checkWasFullBuild();
alter("PR113257","inc1");
build("PR113257");
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
}
public void testPr123612() {
initialiseProject("PR123612");
build("PR123612");
alter("PR123612","inc1");
build("PR123612");
checkWasFullBuild();
}
public void testPr152257() {
configureNonStandardCompileOptions("-XnoInline");
initialiseProject("PR152257");
build("PR152257");
List errors = MyTaskListManager.getErrorMessages();
assertTrue("Should be no warnings, but there are #"+errors.size(),errors.size()==0);
checkWasFullBuild();
alter("PR152257","inc1");
build("PR152257");
errors = MyTaskListManager.getErrorMessages();
assertTrue("Should be no warnings, but there are #"+errors.size(),errors.size()==0);
checkWasntFullBuild();
}
public void testPr128655() {
configureNonStandardCompileOptions("-showWeaveInfo");
initialiseProject("pr128655");
build("pr128655");
List firstBuildMessages = MyTaskListManager.getWeavingMessages();
assertTrue("Should be at least one message about the dec @type, but there were none",firstBuildMessages.size()>0);
alter("pr128655","inc1");
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
build("pr128655");
checkWasntFullBuild();
List secondBuildMessages = MyTaskListManager.getWeavingMessages();
for (int i = 0; i < firstBuildMessages.size(); i++) {
IMessage m1 = (IMessage)firstBuildMessages.get(i);
IMessage m2 = (IMessage)secondBuildMessages.get(i);
if (!m1.toString().equals(m2.toString())) {
System.err.println("Message during first build was: "+m1);
System.err.println("Message during second build was: "+m1);
fail("The two messages should be the same, but are not: \n"+m1+"!="+m2);
}
}
}
public void testPr128655_2() {
configureNonStandardCompileOptions("-showWeaveInfo");
initialiseProject("pr128655_2");
build("pr128655_2");
List firstBuildMessages = MyTaskListManager.getWeavingMessages();
assertTrue("Should be at least one message about the dec @type, but there were none",firstBuildMessages.size()>0);
alter("pr128655_2","inc1");
build("pr128655_2");
checkWasntFullBuild();
List secondBuildMessages = MyTaskListManager.getWeavingMessages();
for (int i = 0; i < firstBuildMessages.size(); i++) {
IMessage m1 = (IMessage)firstBuildMessages.get(i);
IMessage m2 = (IMessage)secondBuildMessages.get(i);
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
if (!m1.toString().equals(m2.toString())) {
System.err.println("Message during first build was: "+m1);
System.err.println("Message during second build was: "+m1);
fail("The two messages should be the same, but are not: \n"+m1+"!="+m2);
}
}
}
public void testPr129163() {
configureBuildStructureModel(true);
initialiseProject("PR129613");
build("PR129613");
alter("PR129613","inc1");
build("PR129613");
assertTrue("There should be no exceptions handled:\n"+MyErrorHandler.getErrorMessages(),
MyErrorHandler.getErrorMessages().isEmpty());
assertEquals("warning message should be 'no match for this type name: File [Xlint:invalidAbsoluteTypeName]' ",
"no match for this type name: File [Xlint:invalidAbsoluteTypeName]",
((IMessage)MyTaskListManager.getWarningMessages().get(0))
.getMessage());
configureBuildStructureModel(false);
}
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
public void testPr129163_2() {
configureBuildStructureModel(true);
initialiseProject("pr129163_2");
build("pr129163_2");
checkWasFullBuild();
alter("pr129163_2","inc1");
build("pr129163_2");
checkWasntFullBuild();
configureBuildStructureModel(false);
}
public void testPr129163_3() {
configureBuildStructureModel(true);
initialiseProject("PR129163_4");
build("PR129163_4");
checkWasFullBuild();
initialiseProject("PR129163_3");
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
configureNewProjectDependency("PR129163_3","PR129163_4");
build("PR129163_3");
checkWasFullBuild();
alter("PR129163_4","inc1");
build("PR129163_4");
checkWasntFullBuild();
alter("PR129163_3","inc1");
build("PR129163_3");
checkWasntFullBuild();
configureBuildStructureModel(false);
}
public void testPr133117() {
configureNonStandardCompileOptions("-Xlint:warning");
initialiseProject("PR133117");
build("PR133117");
assertTrue("There should only be one xlint warning message reported:\n"
+MyTaskListManager.getWarningMessages(),
MyTaskListManager.getWarningMessages().size()==1);
alter("PR133117","inc1");
build("PR133117");
List warnings = MyTaskListManager.getWarningMessages();
List noGuardWarnings = new ArrayList();
for (Iterator iter = warnings.iterator(); iter.hasNext();) {
IMessage element = (IMessage) iter.next();
if (element.getMessage().indexOf("Xlint:noGuardForLazyTjp") != -1) {
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
noGuardWarnings.add(element);
}
}
assertTrue("There should only be two Xlint:noGuardForLazyTjp warning message reported:\n"
+noGuardWarnings,noGuardWarnings.size() == 2);
}
public void testPr131505() {
configureNonStandardCompileOptions("-outxml");
initialiseProject("PR131505");
build("PR131505");
checkWasFullBuild();
checkXMLAspectCount("PR131505","",0);
alter("PR131505","inc1");
build("PR131505");
checkWasFullBuild();
checkXMLAspectCount("PR131505","",1);
checkXMLAspectCount("PR131505","A",1);
alter("PR131505","inc2");
build("PR131505");
checkWasntFullBuild();
checkXMLAspectCount("PR131505","",1);
checkXMLAspectCount("PR131505","A",1);
alter("PR131505","inc3");
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
build("PR131505");
checkWasFullBuild();
checkXMLAspectCount("PR131505","",2);
checkXMLAspectCount("PR131505","A1",1);
checkXMLAspectCount("PR131505","A",1);
File a1 = new File(getWorkingDir().getAbsolutePath()
+ File.separatorChar + "PR131505" + File.separatorChar + "A1.aj");
a1.delete();
build("PR131505");
checkWasFullBuild();
checkXMLAspectCount("PR131505","",1);
checkXMLAspectCount("PR131505","A1",0);
checkXMLAspectCount("PR131505","A",1);
alter("PR131505","inc4");
build("PR131505");
checkWasFullBuild();
checkXMLAspectCount("PR131505","",2);
checkXMLAspectCount("PR131505","A",1);
checkXMLAspectCount("PR131505","pkg.A",1);
}
public void testPr136585() {
initialiseProject("PR136585");
build("PR136585");
alter("PR136585","inc1");
build("PR136585");
assertTrue("There should be no errors reported:\n"+MyTaskListManager.getErrorMessages(),
MyTaskListManager.getErrorMessages().isEmpty());
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
}
public void testPr133532() {
initialiseProject("PR133532");
build("PR133532");
alter("PR133532","inc1");
build("PR133532");
alter("PR133532","inc2");
build("PR133532");
assertTrue("There should be no errors reported:\n"+MyTaskListManager.getErrorMessages(),
MyTaskListManager.getErrorMessages().isEmpty());
}
public void testPr133532_2() {
initialiseProject("pr133532_2");
build("pr133532_2");
alter("pr133532_2","inc2");
build("pr133532_2");
assertTrue("There should be no errors reported:\n"+MyTaskListManager.getErrorMessages(),
MyTaskListManager.getErrorMessages().isEmpty());
String decisions = AjdeInteractionTestbed.MyStateListener.getDecisions();
String expect="Need to recompile 'A.aj'";
assertTrue("Couldn't find build decision: '"+expect+"' in the list of decisions made:\n"+decisions,
decisions.indexOf(expect)!=-1);
}
public void testPr134541() {
initialiseProject("PR134541");
build("PR134541");
assertEquals("[Xlint:adviceDidNotMatch] should be associated with line 5",5,
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
((IMessage)MyTaskListManager.getWarningMessages().get(0)).getSourceLocation().getLine());
alter("PR134541","inc1");
build("PR134541");
if (AsmManager.getDefault().getHandleProvider().dependsOnLocation())
checkWasFullBuild();
else
checkWasntFullBuild();
assertEquals("[Xlint:adviceDidNotMatch] should now be associated with line 7",7,
((IMessage)MyTaskListManager.getWarningMessages().get(0)).getSourceLocation().getLine());
}
public void testJDTLikeHandleProviderWithLstFile_pr141730() {
IElementHandleProvider handleProvider = AsmManager.getDefault().getHandleProvider();
AsmManager.getDefault().setHandleProvider(new JDTLikeHandleProvider());
configureBuildStructureModel(true);
try {
initialiseProject("JDTLikeHandleProvider");
build("JDTLikeHandleProvider");
IHierarchy top = AsmManager.getDefault().getHierarchy();
IProgramElement pe = top.findElementForType("pkg","A");
String expectedHandle = "build<pkg*A.aj}A";
assertEquals("expected handle to be " + expectedHandle + ", but found "
+ pe.getHandleIdentifier(),expectedHandle,pe.getHandleIdentifier());
} finally {
AsmManager.getDefault().setHandleProvider(handleProvider);
configureBuildStructureModel(false);
}
}
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
public void testMovingAdviceDoesntChangeHandles_pr141730() {
IElementHandleProvider handleProvider = AsmManager.getDefault().getHandleProvider();
AsmManager.getDefault().setHandleProvider(new JDTLikeHandleProvider());
configureBuildStructureModel(true);
try {
initialiseProject("JDTLikeHandleProvider");
build("JDTLikeHandleProvider");
checkWasFullBuild();
IHierarchy top = AsmManager.getDefault().getHierarchy();
IProgramElement pe = top.findElementForLabel(top.getRoot(),
IProgramElement.Kind.ADVICE,"before(): <anonymous pointcut>");
alter("JDTLikeHandleProvider","inc1");
build("JDTLikeHandleProvider");
checkWasntFullBuild();
IHierarchy top2 = AsmManager.getDefault().getHierarchy();
IProgramElement pe2 = top.findElementForLabel(top2.getRoot(),
IProgramElement.Kind.ADVICE,"before(): <anonymous pointcut>");
assertEquals("expected advice to be on line " + pe.getSourceLocation().getLine() + 1
+ " but was on " + pe2.getSourceLocation().getLine(),
pe.getSourceLocation().getLine()+1,pe2.getSourceLocation().getLine());
assertEquals("expected advice to have handle " + pe.getHandleIdentifier()
+ " but found handle " + pe2.getHandleIdentifier(),
pe.getHandleIdentifier(),pe2.getHandleIdentifier());
} finally {
AsmManager.getDefault().setHandleProvider(handleProvider);
configureBuildStructureModel(false);
}
}
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
public void testSwappingAdviceAndHandles_pr141730() {
IElementHandleProvider handleProvider = AsmManager.getDefault().getHandleProvider();
AsmManager.getDefault().setHandleProvider(new JDTLikeHandleProvider());
configureBuildStructureModel(true);
try {
initialiseProject("JDTLikeHandleProvider");
build("JDTLikeHandleProvider");
IHierarchy top = AsmManager.getDefault().getHierarchy();
IProgramElement call = top.findElementForLabel(top.getRoot(),
IProgramElement.Kind.ADVICE, "after(): callPCD..");
IProgramElement exec = top.findElementForLabel(top.getRoot(),
IProgramElement.Kind.ADVICE, "after(): execPCD..");
alter("JDTLikeHandleProvider","inc2");
build("JDTLikeHandleProvider");
checkWasFullBuild();
IHierarchy top2 = AsmManager.getDefault().getHierarchy();
IProgramElement newCall = top2.findElementForLabel(top2.getRoot(),
IProgramElement.Kind.ADVICE, "after(): callPCD..");
IProgramElement newExec = top2.findElementForLabel(top2.getRoot(),
IProgramElement.Kind.ADVICE, "after(): execPCD..");
assertEquals("after swapping places, expected 'after(): callPCD..' " +
"to be on line " + newExec.getSourceLocation().getLine() +
" but was on line " + call.getSourceLocation().getLine(),
newExec.getSourceLocation().getLine(),
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
call.getSourceLocation().getLine());
assertEquals("after swapping places, expected 'after(): callPCD..' " +
"to have handle " + exec.getHandleIdentifier() +
" (because was full build) but had " + newCall.getHandleIdentifier(),
exec.getHandleIdentifier(), newCall.getHandleIdentifier());
} finally {
AsmManager.getDefault().setHandleProvider(handleProvider);
configureBuildStructureModel(false);
}
}
public void testInitializerCountForJDTLikeHandleProvider_pr141730() {
IElementHandleProvider handleProvider = AsmManager.getDefault().getHandleProvider();
AsmManager.getDefault().setHandleProvider(new JDTLikeHandleProvider());
configureBuildStructureModel(true);
try {
initialiseProject("JDTLikeHandleProvider");
build("JDTLikeHandleProvider");
String expected = "build<pkg*A.aj[C|1";
IHierarchy top = AsmManager.getDefault().getHierarchy();
IProgramElement init = top.findElementForLabel(top.getRoot(),
IProgramElement.Kind.INITIALIZER, "...");
assertEquals("expected initializers handle to be " + expected + "," +
" but found " + init.getHandleIdentifier(true),
expected,init.getHandleIdentifier(true));
alter("JDTLikeHandleProvider","inc2");
build("JDTLikeHandleProvider");
checkWasFullBuild();
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
IHierarchy top2 = AsmManager.getDefault().getHierarchy();
IProgramElement init2 = top2.findElementForLabel(top2.getRoot(),
IProgramElement.Kind.INITIALIZER, "...");
assertEquals("expected initializers handle to still be " + expected + "," +
" but found " + init2.getHandleIdentifier(true),
expected,init2.getHandleIdentifier(true));
} finally {
AsmManager.getDefault().setHandleProvider(handleProvider);
configureBuildStructureModel(false);
}
}
public void testPr134471_IncrementalCompilationAndModelUpdates() {
try {
configureBuildStructureModel(true);
configureNonStandardCompileOptions("-showWeaveInfo -emacssym");
initialiseProject("PR134471");
build("PR134471");
IProgramElement nodeForTypeA = checkForNode("pkg","A",true);
IProgramElement nodeForAdvice = findAdvice(nodeForTypeA);
List relatedElements = getRelatedElements(nodeForAdvice,1);
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
IProgramElement programElement = getFirstRelatedElement(findCode(checkForNode("pkg","C",true)));
int line = programElement.getSourceLocation().getLine();
assertTrue("advice should be at line 7 - but is at line "+line,line==7);
alter("PR134471","inc1");
build("PR134471");
nodeForTypeA = checkForNode("pkg","A",true);
nodeForAdvice = findAdvice(nodeForTypeA);
relatedElements = getRelatedElements(nodeForAdvice,1);
programElement = getFirstRelatedElement(findCode(checkForNode("pkg","C",true)));
line = programElement.getSourceLocation().getLine();
assertTrue("advice should be at line 7 - but is at line "+line,line==7);
} finally {
}
}
public void testPr134471_MovingAdvice() {
configureBuildStructureModel(true);
configureNonStandardCompileOptions("-showWeaveInfo -emacssym");
initialiseProject("PR134471_2");
build("PR134471_2");
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
IProgramElement programElement = getFirstRelatedElement(findCode(checkForNode("pkg","C",true)));
int line = programElement.getSourceLocation().getLine();
assertTrue("advice should be at line 7 - but is at line "+line,line==7);
alter("PR134471_2","inc1");
build("PR134471_2");
if (AsmManager.getDefault().getHandleProvider().dependsOnLocation())
checkWasFullBuild();
else
checkWasntFullBuild();
programElement = getFirstRelatedElement(findCode(checkForNode("pkg","C",true)));
line = programElement.getSourceLocation().getLine();
assertTrue("advice should be at line 11 - but is at line "+line,line==11);
}
public void testAddingAndRemovingDecwWithStructureModel() {
configureBuildStructureModel(true);
initialiseProject("P3");
build("P3");
alter("P3","inc1");
build("P3");
assertTrue("There should be no exceptions handled:\n"+MyErrorHandler.getErrorMessages(),
MyErrorHandler.getErrorMessages().isEmpty());
alter("P3","inc2");
build("P3");
assertTrue("There should be no exceptions handled:\n"+MyErrorHandler.getErrorMessages(),
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
MyErrorHandler.getErrorMessages().isEmpty());
configureBuildStructureModel(false);
}
public void testPr134471_IncrementallyRecompilingTheAffectedClass() {
try {
configureBuildStructureModel(true);
configureNonStandardCompileOptions("-showWeaveInfo -emacssym");
initialiseProject("PR134471");
build("PR134471");
IProgramElement programElement = getFirstRelatedElement(findCode(checkForNode("pkg","C",true)));
int line = programElement.getSourceLocation().getLine();
assertTrue("advice should be at line 7 - but is at line "+line,line==7);
alter("PR134471","inc1");
build("PR134471");
IProgramElement nodeForTypeA = checkForNode("pkg","A",true);
IProgramElement nodeForAdvice = findAdvice(nodeForTypeA);
List relatedElements = getRelatedElements(nodeForAdvice,1);
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
alter("PR134471","inc2");
build("PR134471");
checkWasntFullBuild();
programElement = getFirstRelatedElement(findCode(checkForNode("pkg","C",true)));
line = programElement.getSourceLocation().getLine();
assertTrue("advice should be at line 7 - but is at line "+line,line==7);
} finally {
}
}
public void testPr134471_IncrementallyRecompilingAspectContainingDeclare() {
configureBuildStructureModel(true);
configureNonStandardCompileOptions("-showWeaveInfo -emacssym");
initialiseProject("PR134471_3");
build("PR134471_3");
checkWasFullBuild();
IProgramElement programElement = getFirstRelatedElement(findCode(checkForNode("pkg","C",true),7));
int line = programElement.getSourceLocation().getLine();
assertTrue("declare warning should be at line 10 - but is at line "+line,line==10);
programElement = getFirstRelatedElement(findCode(checkForNode("pkg","C",true),6));
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
line = programElement.getSourceLocation().getLine();
assertTrue("advice should be at line 7 - but is at line "+line,line==7);
alter("PR134471_3","inc1");
build("PR134471_3");
if (AsmManager.getDefault().getHandleProvider().dependsOnLocation())
checkWasFullBuild();
else
checkWasntFullBuild();
programElement = getFirstRelatedElement(findCode(checkForNode("pkg","C",true),7));
line = programElement.getSourceLocation().getLine();
assertTrue("declare warning should be at line 12 - but is at line "+line,line==12);
alter("PR134471_3","inc2");
build("PR134471_3");
checkWasntFullBuild();
programElement = getFirstRelatedElement(findCode(checkForNode("pkg","C",true),7));
line = programElement.getSourceLocation().getLine();
assertTrue("declare warning should be at line 12 - but is at line "+line,line==12);
configureBuildStructureModel(false);
}
public void testPr134471_IncrementallyRecompilingTheClassAffectedByDeclare() {
configureBuildStructureModel(true);
configureNonStandardCompileOptions("-showWeaveInfo -emacssym");
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
initialiseProject("PR134471_3");
build("PR134471_3");
checkWasFullBuild();
IProgramElement programElement = getFirstRelatedElement(findCode(checkForNode("pkg","C",true),7));
int line = programElement.getSourceLocation().getLine();
assertTrue("declare warning should be at line 10 - but is at line "+line,line==10);
programElement = getFirstRelatedElement(findCode(checkForNode("pkg","C",true),6));
line = programElement.getSourceLocation().getLine();
assertTrue("advice should be at line 7 - but is at line "+line,line==7);
alter("PR134471_3","inc1");
build("PR134471_3");
if (AsmManager.getDefault().getHandleProvider().dependsOnLocation())
checkWasFullBuild();
else
checkWasntFullBuild();
programElement = getFirstRelatedElement(findCode(checkForNode("pkg","C",true),7));
line = programElement.getSourceLocation().getLine();
assertTrue("declare warning should be at line 12 - but is at line "+line,line==12);
alter("PR134471_3","inc2");
build("PR134471_3");
checkWasntFullBuild();
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
programElement = getFirstRelatedElement(findCode(checkForNode("pkg","C",true),7));
line = programElement.getSourceLocation().getLine();
assertTrue("declare warning should be at line 12 - but is at line "+line,line==12);
alter("PR134471_3","inc3");
build("PR134471_3");
checkWasntFullBuild();
programElement = getFirstRelatedElement(findCode(checkForNode("pkg","C",true),7));
line = programElement.getSourceLocation().getLine();
assertTrue("declare warning should be at line 12 - but is at line "+line,line==12);
configureBuildStructureModel(false);
}
public void testDontLoseXlintWarnings_pr141556() {
configureNonStandardCompileOptions("-Xlint:warning");
initialiseProject("PR141556");
build("PR141556");
checkWasFullBuild();
String warningMessage = "can not build thisJoinPoint " +
"lazily for this advice since it has no suitable guard " +
"[Xlint:noGuardForLazyTjp]";
assertEquals("warning message should be '" + warningMessage + "'",
warningMessage,
((IMessage)MyTaskListManager.getWarningMessages().get(0))
.getMessage());
alter("PR141556","inc1");
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
alter("PR141556","inc2");
build("PR141556");
checkWasntFullBuild();
assertTrue("there should still be a warning message ",
!MyTaskListManager.getWarningMessages().isEmpty());
assertEquals("warning message should be '" + warningMessage + "'",
warningMessage,
((IMessage)MyTaskListManager.getWarningMessages().get(0))
.getMessage());
}
public void testLintMessage_pr141564() {
configureNonStandardCompileOptions("-Xlint:warning");
initialiseProject("PR141556");
build("PR141556");
IMessageHandler handler = AjdeManager.getMessageHandler();
assertTrue("expected the handler to be an IMessageHolder but wasn't ",
handler instanceof IMessageHolder);
IMessage[] msgs = ((IMessageHolder)AjdeManager.getMessageHandler()).getMessages(null,true);
assertTrue("There should be no messages but I found: "+msgs.length,msgs.length==0);
List tasklistMessages = MyTaskListManager.getWarningMessages();
assertTrue("Should be one message but found "+tasklistMessages.size(),tasklistMessages.size()==1);
IMessage msg = (IMessage)tasklistMessages.get(0);
assertTrue("expected message to be a LintMessage but wasn't",
msg instanceof LintMessage);
assertTrue("expected message to be noGuardForLazyTjp xlint message but" +
" instead was " + ((LintMessage)msg).getKind().toString(),
((LintMessage)msg).getLintKind().equals("noGuardForLazyTjp"));
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
assertTrue("expected message to be against file in project 'PR141556' but wasn't",
msg.getSourceLocation().getSourceFile().getAbsolutePath().indexOf("PR141556") != -1);
}
public void testAdviceDidNotMatch_pr152589() {
initialiseProject("PR152589");
build("PR152589");
List warnings = MyTaskListManager.getWarningMessages();
assertTrue("There should be no warnings:\n"+warnings,
warnings.isEmpty());
alter("PR152589","inc1");
build("PR152589");
checkWasFullBuild();
warnings = MyTaskListManager.getWarningMessages();
assertTrue("There should be no warnings after adding a whitespace:\n"
+warnings,warnings.isEmpty());
}
/**
* Retrieve program elements related to this one regardless of the relationship. A JUnit assertion is
* made that the number that the 'expected' number are found.
*
* @param programElement Program element whose related elements are to be found
* @param expected the number of expected related elements
*/
private List getRelatedElements(IProgramElement programElement,int expected) {
List relatedElements = getRelatedElements(programElement);
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
StringBuffer debugString = new StringBuffer();
if (relatedElements!=null) {
for (Iterator iter = relatedElements.iterator(); iter.hasNext();) {
String element = (String) iter.next();
debugString.append(AsmManager.getDefault().getHierarchy().findElementForHandle(element).toLabelString()).append("\n");
}
}
assertTrue("Should be "+expected+" element"+(expected>1?"s":"")+" related to this one '"+programElement+
"' but found :\n "+debugString,relatedElements!=null && relatedElements.size()==1);
return relatedElements;
}
private IProgramElement getFirstRelatedElement(IProgramElement programElement) {
List rels = getRelatedElements(programElement,1);
return AsmManager.getDefault().getHierarchy().findElementForHandle((String)rels.get(0));
}
private List getRelatedElements(IProgramElement advice) {
List output = null;
IRelationshipMap map = AsmManager.getDefault().getRelationshipMap();
List rels = (List)map.get(advice);
if (rels==null) fail("Did not find any related elements!");
for (Iterator iter = rels.iterator(); iter.hasNext();) {
IRelationship element = (IRelationship) iter.next();
List targets = element.getTargets();
if (output==null) output = new ArrayList();
output.addAll(targets);
}
return output;
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
}
private IProgramElement findAdvice(IProgramElement ipe) {
return findAdvice(ipe,1);
}
private IProgramElement findAdvice(IProgramElement ipe,int whichOne) {
if (ipe.getKind()==IProgramElement.Kind.ADVICE) {
whichOne=whichOne-1;
if (whichOne==0) return ipe;
}
List kids = ipe.getChildren();
for (Iterator iter = kids.iterator(); iter.hasNext();) {
IProgramElement kid = (IProgramElement) iter.next();
IProgramElement found = findAdvice(kid,whichOne);
if (found!=null) return found;
}
return null;
}
/**
* Finds the first 'code' program element below the element supplied - will return null if there aren't any
*/
private IProgramElement findCode(IProgramElement ipe) {
return findCode(ipe,-1);
}
/**
* Searches a hierarchy of program elements for a 'code' element at the specified line number, a line number
* of -1 means just return the first one you find
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
*/
private IProgramElement findCode(IProgramElement ipe,int linenumber) {
if (ipe.getKind()==IProgramElement.Kind.CODE) {
if (linenumber==-1 || ipe.getSourceLocation().getLine()==linenumber) return ipe;
}
List kids = ipe.getChildren();
for (Iterator iter = kids.iterator(); iter.hasNext();) {
IProgramElement kid = (IProgramElement) iter.next();
IProgramElement found = findCode(kid,linenumber);
if (found!=null) return found;
}
return null;
}
/**
* Check we compiled/wove the right number of files, passing '-1' indicates you don't care about
* that number.
*/
private void checkCompileWeaveCount(int expCompile,int expWoven) {
if (expCompile!=-1 && getCompiledFiles().size()!=expCompile)
fail("Expected compilation of "+expCompile+" files but compiled "+getCompiledFiles().size()+
"\n"+printCompiledAndWovenFiles());
if (expWoven!=-1 && getWovenClasses().size()!=expWoven)
fail("Expected weaving of "+expWoven+" files but wove "+getWovenClasses().size()+
"\n"+printCompiledAndWovenFiles());
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
}
private void checkWasntFullBuild() {
assertTrue("Shouldn't have been a full (batch) build",!wasFullBuild());
}
private void checkWasFullBuild() {
assertTrue("Should have been a full (batch) build",wasFullBuild());
}
private IProgramElement checkForNode(String packageName,String typeName,boolean shouldBeFound) {
IProgramElement ipe = AsmManager.getDefault().getHierarchy().findElementForType(packageName,typeName);
if (shouldBeFound) {
if (ipe==null) printModel();
assertTrue("Should have been able to find '"+packageName+"."+typeName+"' in the asm",ipe!=null);
} else {
if (ipe!=null) printModel();
assertTrue("Should have NOT been able to find '"+packageName+"."+typeName+"' in the asm",ipe==null);
}
return ipe;
}
private void printModel() {
try {
AsmManager.dumptree(AsmManager.getDefault().getHierarchy().getRoot(),0);
} catch (IOException e) {
e.printStackTrace();
}
}
/*
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
* Applies an overlay onto the project being tested - copying
* the contents of the specified overlay directory.
*/
private void alter(String projectName,String overlayDirectory) {
File projectSrc =new File(testdataSrcDir+File.separatorChar+projectName+
File.separatorChar+overlayDirectory);
File destination=new File(getWorkingDir(),projectName);
copy(projectSrc,destination);
}
private static void log(String msg) {
if (VERBOSE) System.out.println(msg);
}
/**
* Count the number of times a specified aspectName appears in the default
* aop.xml file and compare with the expected number of occurrences. If just
* want to count the number of aspects mentioned within the file then
* pass "" for the aspectName, otherwise, specify the name of the
* aspect interested in.
*/
private void checkXMLAspectCount(String projectName, String aspectName, int expectedOccurrences) {
int aspectCount = 0;
File aopXML = new File(getWorkingDir().getAbsolutePath()
+ File.separatorChar + projectName + File.separatorChar
+ "bin" + File.separatorChar + "META-INF" + File.separatorChar + "aop.xml");
if (!aopXML.exists()) {
fail("Expected file " + aopXML.getAbsolutePath() + " to exist but it doesn't");
}
try {
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
BufferedReader reader = new BufferedReader(new FileReader(aopXML));
String line = reader.readLine();
while (line != null) {
if (aspectName.equals("") && line.indexOf("aspect name=\"") != -1) {
aspectCount++;
} else if (line.indexOf("aspect name=\""+aspectName+"\"") != -1) {
aspectCount++;
}
line = reader.readLine();
}
reader.close();
} catch (IOException ie) {
ie.printStackTrace();
}
if (aspectCount != expectedOccurrences) {
fail("Expected aspect " + aspectName + " to appear " + expectedOccurrences + " times" +
" in the aop.xml file but found " + aspectCount + " occurrences");
}
}
private File getProjectRelativePath(String p,String filename) {
File projDir = new File(getWorkingDir(),p);
return new File(projDir,filename);
}
private File getProjectOutputRelativePath(String p,String filename) {
File projDir = new File(getWorkingDir(),p);
return new File(projDir,"bin"+File.separator+filename);
}
}
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
|
/*******************************************************************************
* Copyright (c) 2005 Contributors.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://eclipse.org/legal/epl-v10.html
*
* Contributors:
* initial implementation Alexandre Vasseur
*******************************************************************************/
package org.aspectj.weaver.bcel;
import org.aspectj.apache.bcel.Constants;
import org.aspectj.apache.bcel.generic.ATHROW;
import org.aspectj.apache.bcel.generic.BranchInstruction;
import org.aspectj.apache.bcel.generic.InstructionConstants;
import org.aspectj.apache.bcel.generic.InstructionFactory;
import org.aspectj.apache.bcel.generic.InstructionHandle;
import org.aspectj.apache.bcel.generic.InstructionList;
import org.aspectj.apache.bcel.generic.NOP;
import org.aspectj.apache.bcel.generic.ObjectType;
import org.aspectj.apache.bcel.generic.POP;
import org.aspectj.apache.bcel.generic.PUSH;
import org.aspectj.apache.bcel.generic.ReferenceType;
import org.aspectj.apache.bcel.generic.Type;
import org.aspectj.weaver.AjAttribute;
import org.aspectj.weaver.AjcMemberMaker;
import org.aspectj.weaver.Member;
import org.aspectj.weaver.NameMangler;
import org.aspectj.weaver.ResolvedMember;
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
|
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.patterns.PerClause;
/**
* Adds aspectOf, hasAspect etc to the annotation defined aspects
*
* @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
*/
public class BcelPerClauseAspectAdder extends BcelTypeMunger {
private PerClause.Kind kind;
private boolean hasGeneratedInner = false;
public BcelPerClauseAspectAdder(ResolvedType aspect, PerClause.Kind kind) {
super(null,aspect);
this.kind = kind;
if (kind == PerClause.SINGLETON || kind == PerClause.PERTYPEWITHIN || kind == PerClause.PERCFLOW) {
hasGeneratedInner = true;
}
}
public boolean munge(BcelClassWeaver weaver) {
LazyClassGen gen = weaver.getLazyClassGen();
doAggressiveInner(gen);
if (!gen.getType().equals(aspectType)) {
return false;
}
return doMunge(gen, true);
}
public boolean forceMunge(LazyClassGen gen, boolean checkAlreadyThere) {
doAggressiveInner(gen);
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
|
return doMunge(gen, checkAlreadyThere);
}
private void doAggressiveInner(LazyClassGen gen) {
if (!hasGeneratedInner) {
if (kind == PerClause.PEROBJECT) {
UnresolvedType interfaceTypeX = AjcMemberMaker.perObjectInterfaceType(aspectType);
LazyClassGen interfaceGen = new LazyClassGen(
interfaceTypeX.getName(),
"java.lang.Object",
null,
Constants.ACC_INTERFACE + Constants.ACC_PUBLIC + Constants.ACC_ABSTRACT,
new String[0],
getWorld()
);
interfaceGen.addMethodGen(makeMethodGen(interfaceGen, AjcMemberMaker.perObjectInterfaceGet(aspectType)));
interfaceGen.addMethodGen(makeMethodGen(interfaceGen, AjcMemberMaker.perObjectInterfaceSet(aspectType)));
gen.addGeneratedInner(interfaceGen);
}
hasGeneratedInner = true;
}
}
private boolean doMunge(LazyClassGen gen, boolean checkAlreadyThere) {
if (checkAlreadyThere && hasPerClauseMembersAlready(gen)) {
return false;
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
|
}
generatePerClauseMembers(gen);
if (kind == PerClause.SINGLETON) {
generatePerSingletonAspectOfMethod(gen);
generatePerSingletonHasAspectMethod(gen);
generatePerSingletonAjcClinitMethod(gen);
} else if (kind == PerClause.PEROBJECT) {
generatePerObjectAspectOfMethod(gen);
generatePerObjectHasAspectMethod(gen);
generatePerObjectBindMethod(gen);
} else if (kind == PerClause.PERCFLOW) {
generatePerCflowAspectOfMethod(gen);
generatePerCflowHasAspectMethod(gen);
generatePerCflowPushMethod(gen);
generatePerCflowAjcClinitMethod(gen);
} else if (kind == PerClause.PERTYPEWITHIN) {
generatePerTWAspectOfMethod(gen);
generatePerTWHasAspectMethod(gen);
generatePerTWGetInstanceMethod(gen);
generatePerTWCreateAspectInstanceMethod(gen);
} else {
throw new Error("should not happen - not such kind " + kind.getName());
}
return true;
}
public ResolvedMember getMatchingSyntheticMember(Member member) {
return null;
}
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
|
public ResolvedMember getSignature() {
return null;
}
public boolean matches(ResolvedType onType) {
return true;
}
private boolean hasPerClauseMembersAlready(LazyClassGen classGen) {
ResolvedMember[] methods = classGen.getBcelObjectType().getDeclaredMethods();
for (int i = 0; i < methods.length; i++) {
ResolvedMember method = methods[i];
if ("aspectOf".equals(method.getName())) {
if ("()".equals(method.getParameterSignature()) && (kind == PerClause.SINGLETON || kind == PerClause.PERCFLOW)) {
return true;
} else if ("(Ljava/lang/Object;)".equals(method.getParameterSignature()) && kind == PerClause.PEROBJECT) {
return true;
} else if ("(Ljava/lang/Class;)".equals(method.getParameterSignature()) && kind == PerClause.PERTYPEWITHIN) {
return true;
}
}
}
return false;
}
private void generatePerClauseMembers(LazyClassGen classGen) {
ResolvedMember failureFieldInfo = AjcMemberMaker.initFailureCauseField(aspectType);
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
|
classGen.addField(makeFieldGen(classGen, failureFieldInfo).getField(), null);
if (kind == PerClause.SINGLETON) {
ResolvedMember perSingletonFieldInfo = AjcMemberMaker.perSingletonField(aspectType);
classGen.addField(makeFieldGen(classGen, perSingletonFieldInfo).getField(), null);
} else if (kind == PerClause.PERCFLOW) {
ResolvedMember perCflowFieldInfo = AjcMemberMaker.perCflowField(aspectType);
classGen.addField(makeFieldGen(classGen, perCflowFieldInfo).getField(), null);
} else if (kind == PerClause.PERTYPEWITHIN) {
ResolvedMember perTypeWithinForField = AjcMemberMaker.perTypeWithinWithinTypeField(aspectType, aspectType);
classGen.addField(makeFieldGen(classGen, perTypeWithinForField).getField(), null);
}
}
private void generatePerSingletonAspectOfMethod(LazyClassGen classGen) {
InstructionFactory factory = classGen.getFactory();
LazyMethodGen method = makeMethodGen(classGen, AjcMemberMaker.perSingletonAspectOfMethod(aspectType));
flagAsSynthetic(method, false);
classGen.addMethodGen(method);
InstructionList il = method.getBody();
il.append(Utility.createGet(factory, AjcMemberMaker.perSingletonField(aspectType)));
BranchInstruction ifNotNull = InstructionFactory.createBranchInstruction(Constants.IFNONNULL, null);
il.append(ifNotNull);
il.append(factory.createNew(AjcMemberMaker.NO_ASPECT_BOUND_EXCEPTION.getName()));
il.append(InstructionConstants.DUP);
il.append(new PUSH(classGen.getConstantPoolGen(), aspectType.getName()));
il.append(Utility.createGet(factory, AjcMemberMaker.initFailureCauseField(aspectType)));
il.append(factory.createInvoke(AjcMemberMaker.NO_ASPECT_BOUND_EXCEPTION.getName(), "<init>", Type.VOID, new Type[] { Type.STRING, new ObjectType("java.lang.Throwable") }, Constants.INVOKESPECIAL));
il.append(InstructionConstants.ATHROW);
InstructionHandle ifElse = il.append(Utility.createGet(factory, AjcMemberMaker.perSingletonField(aspectType)));
il.append(InstructionFactory.createReturn(Type.OBJECT));
ifNotNull.setTarget(ifElse);
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
|
}
private void generatePerSingletonHasAspectMethod(LazyClassGen classGen) {
InstructionFactory factory = classGen.getFactory();
LazyMethodGen method = makeMethodGen(classGen, AjcMemberMaker.perSingletonHasAspectMethod(aspectType));
flagAsSynthetic(method, false);
classGen.addMethodGen(method);
InstructionList il = method.getBody();
il.append(Utility.createGet(factory, AjcMemberMaker.perSingletonField(aspectType)));
BranchInstruction ifNull = InstructionFactory.createBranchInstruction(Constants.IFNULL, null);
il.append(ifNull);
il.append(new PUSH(classGen.getConstantPoolGen(), true));
il.append(InstructionFactory.createReturn(Type.INT));
InstructionHandle ifElse = il.append(new PUSH(classGen.getConstantPoolGen(), false));
il.append(InstructionFactory.createReturn(Type.INT));
ifNull.setTarget(ifElse);
}
private void generatePerSingletonAjcClinitMethod(LazyClassGen classGen) {
InstructionFactory factory = classGen.getFactory();
LazyMethodGen method = makeMethodGen(classGen, AjcMemberMaker.ajcPostClinitMethod(aspectType));
flagAsSynthetic(method, true);
classGen.addMethodGen(method);
InstructionList il = method.getBody();
il.append(factory.createNew(aspectType.getName()));
il.append(InstructionConstants.DUP);
il.append(factory.createInvoke(aspectType.getName(), "<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL));
il.append(Utility.createSet(factory, AjcMemberMaker.perSingletonField(aspectType)));
il.append(InstructionFactory.createReturn(Type.VOID));
LazyMethodGen clinit = classGen.getStaticInitializer();
il = new InstructionList();
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
|
InstructionHandle tryStart = il.append(factory.createInvoke(aspectType.getName(), NameMangler.AJC_POST_CLINIT_NAME, Type.VOID, Type.NO_ARGS, Constants.INVOKESTATIC));
BranchInstruction tryEnd = InstructionFactory.createBranchInstruction(Constants.GOTO, null);
il.append(tryEnd);
InstructionHandle handler = il.append(InstructionConstants.ASTORE_0);
il.append(InstructionConstants.ALOAD_0);
il.append(Utility.createSet(factory, AjcMemberMaker.initFailureCauseField(aspectType)));
il.append(InstructionFactory.createReturn(Type.VOID));
tryEnd.setTarget(il.getEnd());
if (clinit.getBody().getEnd().getInstruction().getOpcode() == Constants.IMPDEP1) {
clinit.getBody().getEnd().getPrev().setInstruction(new NOP());
}
clinit.getBody().getEnd().setInstruction(new NOP());
clinit.getBody().append(il);
clinit.addExceptionHandler(
tryStart, handler, handler, new ObjectType("java.lang.Throwable"), false
);
}
private void generatePerObjectAspectOfMethod(LazyClassGen classGen) {
InstructionFactory factory = classGen.getFactory();
ReferenceType interfaceType = (ReferenceType) BcelWorld.makeBcelType(AjcMemberMaker.perObjectInterfaceType(aspectType));
LazyMethodGen method = makeMethodGen(classGen, AjcMemberMaker.perObjectAspectOfMethod(aspectType));
flagAsSynthetic(method, false);
classGen.addMethodGen(method);
InstructionList il = method.getBody();
il.append(InstructionConstants.ALOAD_0);
il.append(factory.createInstanceOf(interfaceType));
BranchInstruction ifEq = InstructionFactory.createBranchInstruction(Constants.IFEQ, null);
il.append(ifEq);
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
|
il.append(InstructionConstants.ALOAD_0);
il.append(factory.createCheckCast(interfaceType));
il.append(Utility.createInvoke(factory, Constants.INVOKEINTERFACE, AjcMemberMaker.perObjectInterfaceGet(aspectType)));
il.append(InstructionConstants.DUP);
BranchInstruction ifNull = InstructionFactory.createBranchInstruction(Constants.IFNULL, null);
il.append(ifNull);
il.append(InstructionFactory.createReturn(BcelWorld.makeBcelType(aspectType)));
InstructionHandle ifNullElse = il.append(new POP());
ifNull.setTarget(ifNullElse);
InstructionHandle ifEqElse = il.append(factory.createNew(AjcMemberMaker.NO_ASPECT_BOUND_EXCEPTION.getName()));
ifEq.setTarget(ifEqElse);
il.append(InstructionConstants.DUP);
il.append(factory.createInvoke(AjcMemberMaker.NO_ASPECT_BOUND_EXCEPTION.getName(), "<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL));
il.append(new ATHROW());
}
private void generatePerObjectHasAspectMethod(LazyClassGen classGen) {
InstructionFactory factory = classGen.getFactory();
ReferenceType interfaceType = (ReferenceType) BcelWorld.makeBcelType(AjcMemberMaker.perObjectInterfaceType(aspectType));
LazyMethodGen method = makeMethodGen(classGen, AjcMemberMaker.perObjectHasAspectMethod(aspectType));
flagAsSynthetic(method, false);
classGen.addMethodGen(method);
InstructionList il = method.getBody();
il.append(InstructionConstants.ALOAD_0);
il.append(factory.createInstanceOf(interfaceType));
BranchInstruction ifEq = InstructionFactory.createBranchInstruction(Constants.IFEQ, null);
il.append(ifEq);
il.append(InstructionConstants.ALOAD_0);
il.append(factory.createCheckCast(interfaceType));
il.append(Utility.createInvoke(factory, Constants.INVOKEINTERFACE, AjcMemberMaker.perObjectInterfaceGet(aspectType)));
BranchInstruction ifNull = InstructionFactory.createBranchInstruction(Constants.IFNULL, null);
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
|
il.append(ifNull);
il.append(InstructionConstants.ICONST_1);
il.append(InstructionFactory.createReturn(Type.INT));
InstructionHandle ifEqElse = il.append(InstructionConstants.ICONST_0);
ifEq.setTarget(ifEqElse);
ifNull.setTarget(ifEqElse);
il.append(InstructionFactory.createReturn(Type.INT));
}
private void generatePerObjectBindMethod(LazyClassGen classGen) {
InstructionFactory factory = classGen.getFactory();
ReferenceType interfaceType = (ReferenceType) BcelWorld.makeBcelType(AjcMemberMaker.perObjectInterfaceType(aspectType));
LazyMethodGen method = makeMethodGen(classGen, AjcMemberMaker.perObjectBind(aspectType));
flagAsSynthetic(method, true);
classGen.addMethodGen(method);
InstructionList il = method.getBody();
il.append(InstructionConstants.ALOAD_0);
il.append(factory.createInstanceOf(interfaceType));
BranchInstruction ifEq = InstructionFactory.createBranchInstruction(Constants.IFEQ, null);
il.append(ifEq);
il.append(InstructionConstants.ALOAD_0);
il.append(factory.createCheckCast(interfaceType));
il.append(Utility.createInvoke(factory, Constants.INVOKEINTERFACE, AjcMemberMaker.perObjectInterfaceGet(aspectType)));
BranchInstruction ifNonNull = InstructionFactory.createBranchInstruction(Constants.IFNONNULL, null);
il.append(ifNonNull);
il.append(InstructionConstants.ALOAD_0);
il.append(factory.createCheckCast(interfaceType));
il.append(factory.createNew(aspectType.getName()));
il.append(InstructionConstants.DUP);
il.append(factory.createInvoke(aspectType.getName(), "<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL));
il.append(Utility.createInvoke(factory, Constants.INVOKEINTERFACE, AjcMemberMaker.perObjectInterfaceSet(aspectType)));
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
|
InstructionHandle end = il.append(InstructionFactory.createReturn(Type.VOID));
ifEq.setTarget(end);
ifNonNull.setTarget(end);
}
private void generatePerObjectGetSetMethods(LazyClassGen classGen) {
InstructionFactory factory = classGen.getFactory();
LazyMethodGen methodGet = makeMethodGen(classGen, AjcMemberMaker.perObjectInterfaceGet(aspectType));
flagAsSynthetic(methodGet, true);
classGen.addMethodGen(methodGet);
InstructionList ilGet = methodGet.getBody();
ilGet = new InstructionList();
ilGet.append(InstructionConstants.ALOAD_0);
ilGet.append(Utility.createGet(factory, AjcMemberMaker.perObjectField(aspectType, aspectType)));
ilGet.append(InstructionFactory.createReturn(Type.OBJECT));
LazyMethodGen methodSet = makeMethodGen(classGen, AjcMemberMaker.perObjectInterfaceSet(aspectType));
flagAsSynthetic(methodSet, true);
classGen.addMethodGen(methodSet);
InstructionList ilSet = methodSet.getBody();
ilSet = new InstructionList();
ilSet.append(InstructionConstants.ALOAD_0);
ilSet.append(InstructionConstants.ALOAD_1);
ilSet.append(Utility.createSet(factory, AjcMemberMaker.perObjectField(aspectType, aspectType)));
ilSet.append(InstructionFactory.createReturn(Type.VOID));
}
private void generatePerCflowAspectOfMethod(LazyClassGen classGen) {
InstructionFactory factory = classGen.getFactory();
LazyMethodGen method = makeMethodGen(classGen, AjcMemberMaker.perCflowAspectOfMethod(aspectType));
flagAsSynthetic(method, false);
classGen.addMethodGen(method);
InstructionList il = method.getBody();
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
|
il.append(Utility.createGet(factory, AjcMemberMaker.perCflowField(aspectType)));
il.append(Utility.createInvoke(factory, Constants.INVOKEVIRTUAL, AjcMemberMaker.cflowStackPeekInstance()));
il.append(factory.createCheckCast((ReferenceType)BcelWorld.makeBcelType(aspectType)));
il.append(InstructionFactory.createReturn(Type.OBJECT));
}
private void generatePerCflowHasAspectMethod(LazyClassGen classGen) {
InstructionFactory factory = classGen.getFactory();
LazyMethodGen method = makeMethodGen(classGen, AjcMemberMaker.perCflowHasAspectMethod(aspectType));
flagAsSynthetic(method, false);
classGen.addMethodGen(method);
InstructionList il = method.getBody();
il.append(Utility.createGet(factory, AjcMemberMaker.perCflowField(aspectType)));
il.append(Utility.createInvoke(factory, Constants.INVOKEVIRTUAL, AjcMemberMaker.cflowStackIsValid()));
il.append(InstructionFactory.createReturn(Type.INT));
}
private void generatePerCflowPushMethod(LazyClassGen classGen) {
InstructionFactory factory = classGen.getFactory();
LazyMethodGen method = makeMethodGen(classGen, AjcMemberMaker.perCflowPush(aspectType));
flagAsSynthetic(method, true);
classGen.addMethodGen(method);
InstructionList il = method.getBody();
il.append(Utility.createGet(factory, AjcMemberMaker.perCflowField(aspectType)));
il.append(factory.createNew(aspectType.getName()));
il.append(InstructionConstants.DUP);
il.append(factory.createInvoke(aspectType.getName(), "<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL));
il.append(Utility.createInvoke(factory, Constants.INVOKEVIRTUAL, AjcMemberMaker.cflowStackPushInstance()));
il.append(InstructionFactory.createReturn(Type.VOID));
}
private void generatePerCflowAjcClinitMethod(LazyClassGen classGen) {
InstructionFactory factory = classGen.getFactory();
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
|
LazyMethodGen method = makeMethodGen(classGen, AjcMemberMaker.ajcPreClinitMethod(aspectType));
flagAsSynthetic(method, true);
classGen.addMethodGen(method);
InstructionList il = method.getBody();
il.append(factory.createNew(AjcMemberMaker.CFLOW_STACK_TYPE.getName()));
il.append(InstructionConstants.DUP);
il.append(factory.createInvoke(AjcMemberMaker.CFLOW_STACK_TYPE.getName(), "<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL));
il.append(Utility.createSet(factory, AjcMemberMaker.perCflowField(aspectType)));
il.append(InstructionFactory.createReturn(Type.VOID));
LazyMethodGen clinit = classGen.getStaticInitializer();
il = new InstructionList();
il.append(factory.createInvoke(aspectType.getName(), NameMangler.AJC_PRE_CLINIT_NAME, Type.VOID, Type.NO_ARGS, Constants.INVOKESTATIC));
clinit.getBody().insert(il);
}
private void generatePerTWAspectOfMethod(LazyClassGen classGen) {
InstructionFactory factory = classGen.getFactory();
LazyMethodGen method = makeMethodGen(classGen, AjcMemberMaker.perTypeWithinAspectOfMethod(aspectType,classGen.getWorld().isInJava5Mode()));
flagAsSynthetic(method, false);
classGen.addMethodGen(method);
InstructionList il = method.getBody();
InstructionHandle tryStart = il.append(InstructionConstants.ALOAD_0);
il.append(Utility.createInvoke(
factory,
Constants.INVOKESTATIC,
AjcMemberMaker.perTypeWithinGetInstance(aspectType)
));
il.append(InstructionConstants.ASTORE_1);
il.append(InstructionConstants.ALOAD_1);
BranchInstruction ifNonNull = InstructionFactory.createBranchInstruction(Constants.IFNONNULL, null);
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
|
il.append(ifNonNull);
il.append(factory.createNew(AjcMemberMaker.NO_ASPECT_BOUND_EXCEPTION.getName()));
il.append(InstructionConstants.DUP);
il.append(new PUSH(classGen.getConstantPoolGen(), aspectType.getName()));
il.append(InstructionConstants.ACONST_NULL);
il.append(factory.createInvoke(AjcMemberMaker.NO_ASPECT_BOUND_EXCEPTION.getName(), "<init>", Type.VOID, new Type[] { Type.STRING, new ObjectType("java.lang.Throwable") }, Constants.INVOKESPECIAL));
il.append(InstructionConstants.ATHROW);
InstructionHandle ifElse = il.append(InstructionConstants.ALOAD_1);
ifNonNull.setTarget(ifElse);
il.append(InstructionFactory.createReturn(Type.OBJECT));
InstructionHandle handler = il.append(InstructionConstants.ASTORE_1);
il.append(factory.createNew(AjcMemberMaker.NO_ASPECT_BOUND_EXCEPTION.getName()));
il.append(InstructionConstants.DUP);
il.append(factory.createInvoke(AjcMemberMaker.NO_ASPECT_BOUND_EXCEPTION.getName(), "<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL));
il.append(InstructionConstants.ATHROW);
method.addExceptionHandler(
tryStart, handler.getPrev(), handler, new ObjectType("java.lang.Exception"), false
);
}
private void generatePerTWHasAspectMethod(LazyClassGen classGen) {
InstructionFactory factory = classGen.getFactory();
LazyMethodGen method = makeMethodGen(classGen, AjcMemberMaker.perTypeWithinHasAspectMethod(aspectType,classGen.getWorld().isInJava5Mode()));
flagAsSynthetic(method, false);
classGen.addMethodGen(method);
InstructionList il = method.getBody();
InstructionHandle tryStart = il.append(InstructionConstants.ALOAD_0);
il.append(Utility.createInvoke(
factory,
Constants.INVOKESTATIC,
AjcMemberMaker.perTypeWithinGetInstance(aspectType)
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
|
));
BranchInstruction ifNull = InstructionFactory.createBranchInstruction(Constants.IFNULL, null);
il.append(ifNull);
il.append(InstructionConstants.ICONST_1);
il.append(InstructionConstants.IRETURN);
InstructionHandle ifElse = il.append(InstructionConstants.ICONST_0);
ifNull.setTarget(ifElse);
il.append(InstructionConstants.IRETURN);
InstructionHandle handler = il.append(InstructionConstants.ASTORE_1);
il.append(InstructionConstants.ICONST_0);
il.append(InstructionConstants.IRETURN);
method.addExceptionHandler(
tryStart, handler.getPrev(), handler, new ObjectType("java.lang.Exception"), false
);
}
private void generatePerTWGetInstanceMethod(LazyClassGen classGen) {
InstructionFactory factory = classGen.getFactory();
LazyMethodGen method = makeMethodGen(classGen, AjcMemberMaker.perTypeWithinGetInstance(aspectType));
flagAsSynthetic(method, true);
classGen.addMethodGen(method);
InstructionList il = method.getBody();
InstructionHandle tryStart = il.append(InstructionConstants.ALOAD_0);
il.append(new PUSH(factory.getConstantPool(), NameMangler.perTypeWithinLocalAspectOf(aspectType)));
il.append(InstructionConstants.ACONST_NULL);
il.append(factory.createInvoke(
"java/lang/Class",
"getDeclaredMethod",
Type.getType("Ljava/lang/reflect/Method;"),
new Type[]{Type.getType("Ljava/lang/String;"), Type.getType("[Ljava/lang/Class;")},
Constants.INVOKEVIRTUAL
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
|
));
il.append(InstructionConstants.ACONST_NULL);
il.append(InstructionConstants.ACONST_NULL);
il.append(factory.createInvoke(
"java/lang/reflect/Method",
"invoke",
Type.OBJECT,
new Type[]{Type.getType("Ljava/lang/Object;"), Type.getType("[Ljava/lang/Object;")},
Constants.INVOKEVIRTUAL
));
il.append(factory.createCheckCast((ReferenceType) BcelWorld.makeBcelType(aspectType)));
il.append(InstructionConstants.ARETURN);
InstructionHandle handler = il.append(InstructionConstants.ASTORE_1);
il.append(InstructionConstants.ACONST_NULL);
il.append(InstructionConstants.ARETURN);
method.addExceptionHandler(
tryStart, handler.getPrev(), handler, new ObjectType("java.lang.Exception"), false
);
}
private void generatePerTWCreateAspectInstanceMethod(LazyClassGen classGen) {
InstructionFactory factory = classGen.getFactory();
LazyMethodGen method = makeMethodGen(classGen, AjcMemberMaker.perTypeWithinCreateAspectInstance(aspectType));
flagAsSynthetic(method, true);
classGen.addMethodGen(method);
InstructionList il = method.getBody();
il.append(factory.createNew(aspectType.getName()));
il.append(InstructionConstants.DUP);
il.append(factory.createInvoke(
aspectType.getName(), "<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL
));
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
|
il.append(InstructionConstants.ASTORE_1);
il.append(InstructionConstants.ALOAD_1);
il.append(InstructionConstants.ALOAD_0);
il.append(Utility.createSet(
factory,
AjcMemberMaker.perTypeWithinWithinTypeField(aspectType, aspectType)
));
il.append(InstructionConstants.ALOAD_1);
il.append(InstructionConstants.ARETURN);
}
/**
* Add standard Synthetic (if wished) and AjSynthetic (always) attributes
* @param methodGen
* @param makeJavaSynthetic true if standard Synthetic attribute must be set as well (invisible to user)
*/
private static void flagAsSynthetic(LazyMethodGen methodGen, boolean makeJavaSynthetic) {
if (makeJavaSynthetic) {
methodGen.makeSynthetic();
}
methodGen.addAttribute(
BcelAttributes.bcelAttribute(
new AjAttribute.AjSynthetic(),
methodGen.getEnclosingClass().getConstantPoolGen()
)
);
}
}
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/patterns/PerSingleton.java
|
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http:www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* PARC initial implementation
* ******************************************************************/
package org.aspectj.weaver.patterns;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Map;
import org.aspectj.util.FuzzyBoolean;
import org.aspectj.weaver.AjcMemberMaker;
import org.aspectj.weaver.ISourceContext;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.Shadow;
import org.aspectj.weaver.VersionedDataInputStream;
import org.aspectj.weaver.ast.Expr;
import org.aspectj.weaver.ast.Literal;
import org.aspectj.weaver.ast.Test;
import org.aspectj.weaver.bcel.BcelAccessForInlineMunger;
public class PerSingleton extends PerClause {
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/patterns/PerSingleton.java
|
public PerSingleton() {
}
public Object accept(PatternNodeVisitor visitor, Object data) {
return visitor.visit(this,data);
}
public int couldMatchKinds() {
return Shadow.ALL_SHADOW_KINDS_BITS;
}
public FuzzyBoolean fastMatch(FastMatchInfo type) {
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/patterns/PerSingleton.java
|
return FuzzyBoolean.YES;
}
protected FuzzyBoolean matchInternal(Shadow shadow) {
return FuzzyBoolean.YES;
}
public void resolveBindings(IScope scope, Bindings bindings) {
}
public Pointcut parameterizeWith(Map typeVariableMap) {
return this;
}
public Test findResidueInternal(Shadow shadow, ExposedState state) {
Expr myInstance =
Expr.makeCallExpr(AjcMemberMaker.perSingletonAspectOfMethod(inAspect),
Expr.NONE, inAspect);
state.setAspectInstance(myInstance);
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/patterns/PerSingleton.java
|
return Literal.TRUE;
}
public PerClause concretize(ResolvedType inAspect) {
PerSingleton ret = new PerSingleton();
ret.copyLocationFrom(this);
ret.inAspect = inAspect;
if (inAspect.isAnnotationStyleAspect() && !inAspect.isAbstract()) {
inAspect.crosscuttingMembers.addLateTypeMunger(
inAspect.getWorld().makePerClauseAspect(inAspect, getKind())
);
}
if (inAspect.isAnnotationStyleAspect() && !inAspect.getWorld().isXnoInline()) {
inAspect.crosscuttingMembers.addTypeMunger(new BcelAccessForInlineMunger(inAspect));
}
return ret;
}
public void write(DataOutputStream s) throws IOException {
SINGLETON.write(s);
writeLocation(s);
}
public static PerClause readPerClause(VersionedDataInputStream s, ISourceContext context) throws IOException {
PerSingleton ret = new PerSingleton();
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
weaver/src/org/aspectj/weaver/patterns/PerSingleton.java
|
ret.readLocation(context, s);
return ret;
}
public PerClause.Kind getKind() {
return SINGLETON;
}
public String toString() {
return "persingleton(" + inAspect + ")";
}
public String toDeclarationString() {
return "";
}
public boolean equals(Object other) {
if (!(other instanceof PerSingleton)) return false;
PerSingleton pc = (PerSingleton)other;
return ((pc.inAspect == null) ? (inAspect == null) : pc.inAspect.equals(inAspect));
}
public int hashCode() {
int result = 17;
result = 37*result + ((inAspect == null) ? 0 : inAspect.hashCode());
return result;
}
}
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
/*******************************************************************************
* Copyright (c) 2005 Contributors.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alexandre Vasseur initial implementation
* David Knibb weaving context enhancments
*******************************************************************************/
package org.aspectj.weaver.loadtime;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
import java.util.ArrayList;
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import java.util.StringTokenizer;
import org.aspectj.asm.IRelationship;
import org.aspectj.bridge.AbortException;
import org.aspectj.bridge.ISourceLocation;
import org.aspectj.util.LangUtil;
import org.aspectj.weaver.ICrossReferenceHandler;
import org.aspectj.weaver.Lint;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.World;
import org.aspectj.weaver.Lint.Kind;
import org.aspectj.weaver.bcel.BcelWeaver;
import org.aspectj.weaver.loadtime.definition.Definition;
import org.aspectj.weaver.loadtime.definition.DocumentParser;
import org.aspectj.weaver.ltw.LTWWorld;
import org.aspectj.weaver.patterns.PatternParser;
import org.aspectj.weaver.patterns.TypePattern;
import org.aspectj.weaver.tools.GeneratedClassHandler;
import org.aspectj.weaver.tools.Trace;
import org.aspectj.weaver.tools.TraceFactory;
import org.aspectj.weaver.tools.WeavingAdaptor;
/**
* @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
*/
public class ClassLoaderWeavingAdaptor extends WeavingAdaptor {
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
private final static String AOP_XML = "META-INF/aop.xml";
private boolean initialized;
private List m_dumpTypePattern = new ArrayList();
private boolean m_dumpBefore = false;
private List m_includeTypePattern = new ArrayList();
private List m_excludeTypePattern = new ArrayList();
private List m_includeStartsWith = new ArrayList();
private List m_excludeStartsWith = new ArrayList();
private List m_aspectExcludeTypePattern = new ArrayList();
private List m_aspectExcludeStartsWith = new ArrayList();
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
private List m_aspectIncludeTypePattern = new ArrayList();
private List m_aspectIncludeStartsWith = new ArrayList();
private StringBuffer namespace;
private IWeavingContext weavingContext;
private static Trace trace = TraceFactory.getTraceFactory().getTrace(ClassLoaderWeavingAdaptor.class);
public ClassLoaderWeavingAdaptor() {
super();
if (trace.isTraceEnabled()) trace.enter("<init>",this);
if (trace.isTraceEnabled()) trace.exit("<init>");
}
/**
* We don't need a reference to the class loader and using it during
* construction can cause problems with recursion. It also makes sense
* to supply the weaving context during initialization to.
* @deprecated
*/
public ClassLoaderWeavingAdaptor(final ClassLoader deprecatedLoader, final IWeavingContext deprecatedContext) {
super();
if (trace.isTraceEnabled()) trace.enter("<init>",this,new Object[] { deprecatedLoader, deprecatedContext });
if (trace.isTraceEnabled()) trace.exit("<init>");
}
protected void initialize (final ClassLoader classLoader, IWeavingContext context) {
if (initialized) return;
if (trace.isTraceEnabled()) trace.enter("initialize",this,new Object[] { classLoader, context });
this.weavingContext = context;
if (weavingContext == null) {
weavingContext = new DefaultWeavingContext(classLoader);
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
}
createMessageHandler();
this.generatedClassHandler = new GeneratedClassHandler() {
/**
* Callback when we need to define a Closure in the JVM
*
* @param name
* @param bytes
*/
public void acceptClass(String name, byte[] bytes) {
try {
if (shouldDump(name.replace('/', '.'), false)) {
dump(name, bytes, false);
}
} catch (Throwable throwable) {
throwable.printStackTrace();
}
defineClass(classLoader, name, bytes);
}
};
List definitions = parseDefinitions(classLoader);
if (!isEnabled()) {
if (trace.isTraceEnabled()) trace.exit("initialize",false);
return;
}
bcelWorld = new LTWWorld(
classLoader, weavingContext,
getMessageHandler(), new ICrossReferenceHandler() {
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
public void addCrossReference(ISourceLocation from, ISourceLocation to, IRelationship.Kind kind, boolean runtimeTest) {
;
}
}
);
weaver = new BcelWeaver(bcelWorld);
registerDefinitions(weaver, classLoader, definitions);
if (isEnabled()) {
weaver.prepareForWeave();
}
else {
bcelWorld = null;
weaver = null;
}
initialized = true;
if (trace.isTraceEnabled()) trace.exit("initialize",isEnabled());
}
/**
* Load and cache the aop.xml/properties according to the classloader visibility rules
*
* @param weaver
* @param loader
*/
private List parseDefinitions(final ClassLoader loader) {
List definitions = new ArrayList();
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
try {
info("register classloader " + getClassLoaderName(loader));
if (ClassLoader.getSystemClassLoader().equals(loader)) {
String file = System.getProperty("aj5.def", null);
if (file != null) {
info("using (-Daj5.def) " + file);
definitions.add(DocumentParser.parse((new File(file)).toURL()));
}
}
String resourcePath = System.getProperty("org.aspectj.weaver.loadtime.configuration",AOP_XML);
StringTokenizer st = new StringTokenizer(resourcePath,";");
while(st.hasMoreTokens()){
Enumeration xmls = weavingContext.getResources(st.nextToken());
while (xmls.hasMoreElements()) {
URL xml = (URL) xmls.nextElement();
info("using configuration " + weavingContext.getFile(xml));
definitions.add(DocumentParser.parse(xml));
}
}
if (definitions.isEmpty()) {
disable();
info("no configuration found. Disabling weaver for class loader " + getClassLoaderName(loader));
}
} catch (Exception e) {
disable();
warn("parse definitions failed",e);
}
return definitions;
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
}
private void registerDefinitions(final BcelWeaver weaver, final ClassLoader loader, List definitions) {
try {
registerOptions(weaver, loader, definitions);
registerAspectExclude(weaver, loader, definitions);
registerAspectInclude(weaver, loader, definitions);
registerAspects(weaver, loader, definitions);
registerIncludeExclude(weaver, loader, definitions);
registerDump(weaver, loader, definitions);
} catch (Exception e) {
disable();
warn("register definition failed",(e instanceof AbortException)?null:e);
}
}
private String getClassLoaderName (ClassLoader loader) {
return weavingContext.getClassLoaderName();
}
/**
* Configure the weaver according to the option directives
* TODO av - don't know if it is that good to reuse, since we only allow a small subset of options in LTW
*
* @param weaver
* @param loader
* @param definitions
*/
private void registerOptions(final BcelWeaver weaver, final ClassLoader loader, final List definitions) {
StringBuffer allOptions = new StringBuffer();
for (Iterator iterator = definitions.iterator(); iterator.hasNext();) {
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
Definition definition = (Definition) iterator.next();
allOptions.append(definition.getWeaverOptions()).append(' ');
}
Options.WeaverOption weaverOption = Options.parse(allOptions.toString(), loader, getMessageHandler());
World world = weaver.getWorld();
setMessageHandler(weaverOption.messageHandler);
world.setXlazyTjp(weaverOption.lazyTjp);
world.setXHasMemberSupportEnabled(weaverOption.hasMember);
world.setOptionalJoinpoints(weaverOption.optionalJoinpoints);
world.setPinpointMode(weaverOption.pinpoint);
weaver.setReweavableMode(weaverOption.notReWeavable);
world.performExtraConfiguration(weaverOption.xSet);
world.setXnoInline(weaverOption.noInline);
world.setBehaveInJava5Way(LangUtil.is15VMOrGreater());
world.setAddSerialVerUID(weaverOption.addSerialVersionUID);
bcelWorld.getLint().loadDefaultProperties();
bcelWorld.getLint().adviceDidNotMatch.setKind(null);
if (weaverOption.lintFile != null) {
InputStream resource = null;
try {
resource = loader.getResourceAsStream(weaverOption.lintFile);
Exception failure = null;
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
if (resource != null) {
try {
Properties properties = new Properties();
properties.load(resource);
world.getLint().setFromProperties(properties);
} catch (IOException e) {
failure = e;
}
}
if (failure != null || resource == null) {
warn("Cannot access resource for -Xlintfile:"+weaverOption.lintFile,failure);
}
} finally {
try { resource.close(); } catch (Throwable t) {;}
}
}
if (weaverOption.lint != null) {
if (weaverOption.lint.equals("default")) {
bcelWorld.getLint().loadDefaultProperties();
} else {
bcelWorld.getLint().setAll(weaverOption.lint);
}
}
}
private void registerAspectExclude(final BcelWeaver weaver, final ClassLoader loader, final List definitions) {
String fastMatchInfo = null;
for (Iterator iterator = definitions.iterator(); iterator.hasNext();) {
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
Definition definition = (Definition) iterator.next();
for (Iterator iterator1 = definition.getAspectExcludePatterns().iterator(); iterator1.hasNext();) {
String exclude = (String) iterator1.next();
TypePattern excludePattern = new PatternParser(exclude).parseTypePattern();
m_aspectExcludeTypePattern.add(excludePattern);
fastMatchInfo = looksLikeStartsWith(exclude);
if (fastMatchInfo != null) {
m_aspectExcludeStartsWith.add(fastMatchInfo);
}
}
}
}
private void registerAspectInclude(final BcelWeaver weaver, final ClassLoader loader, final List definitions) {
String fastMatchInfo = null;
for (Iterator iterator = definitions.iterator(); iterator.hasNext();) {
Definition definition = (Definition) iterator.next();
for (Iterator iterator1 = definition.getAspectIncludePatterns().iterator(); iterator1.hasNext();) {
String include = (String) iterator1.next();
TypePattern includePattern = new PatternParser(include).parseTypePattern();
m_aspectIncludeTypePattern.add(includePattern);
fastMatchInfo = looksLikeStartsWith(include);
if (fastMatchInfo != null) {
m_aspectIncludeStartsWith.add(fastMatchInfo);
}
}
}
}
protected void lint (String name, String[] infos) {
Lint lint = bcelWorld.getLint();
Kind kind = lint.getLintKind(name);
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
kind.signal(infos,null,null);
}
public String getContextId () {
return weavingContext.getId();
}
/**
* Register the aspect, following include / exclude rules
*
* @param weaver
* @param loader
* @param definitions
*/
private void registerAspects(final BcelWeaver weaver, final ClassLoader loader, final List definitions) {
if (trace.isTraceEnabled()) trace.enter("registerAspects",this, new Object[] { weaver, loader, definitions} );
for (Iterator iterator = definitions.iterator(); iterator.hasNext();) {
Definition definition = (Definition) iterator.next();
for (Iterator aspects = definition.getAspectClassNames().iterator(); aspects.hasNext();) {
String aspectClassName = (String) aspects.next();
if (acceptAspect(aspectClassName)) {
info("register aspect " + aspectClassName);
weaver.addLibraryAspect(aspectClassName);
if(namespace==null){
namespace=new StringBuffer(aspectClassName);
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
}else{
namespace = namespace.append(";"+aspectClassName);
}
}
else {
lint("aspectExcludedByConfiguration", new String[] { aspectClassName, getClassLoaderName(loader) });
}
}
}
for (Iterator iterator = definitions.iterator(); iterator.hasNext();) {
Definition definition = (Definition) iterator.next();
for (Iterator aspects = definition.getConcreteAspects().iterator(); aspects.hasNext();) {
Definition.ConcreteAspect concreteAspect = (Definition.ConcreteAspect) aspects.next();
if (acceptAspect(concreteAspect.name)) {
ConcreteAspectCodeGen gen = new ConcreteAspectCodeGen(concreteAspect, weaver.getWorld());
if (!gen.validate()) {
error("Concrete-aspect '"+concreteAspect.name+"' could not be registered");
break;
}
this.generatedClassHandler.acceptClass(
concreteAspect.name,
gen.getBytes()
);
weaver.addLibraryAspect(concreteAspect.name);
if(namespace==null){
namespace=new StringBuffer(concreteAspect.name);
}else{
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
namespace = namespace.append(";"+concreteAspect.name);
}
}
}
}
if (namespace == null) {
disable();
info("no aspects registered. Disabling weaver for class loader " + getClassLoaderName(loader));
}
if (trace.isTraceEnabled()) trace.exit("registerAspects",isEnabled());
}
/**
* Register the include / exclude filters
* We duplicate simple patterns in startWith filters that will allow faster matching without ResolvedType
*
* @param weaver
* @param loader
* @param definitions
*/
private void registerIncludeExclude(final BcelWeaver weaver, final ClassLoader loader, final List definitions) {
String fastMatchInfo = null;
for (Iterator iterator = definitions.iterator(); iterator.hasNext();) {
Definition definition = (Definition) iterator.next();
for (Iterator iterator1 = definition.getIncludePatterns().iterator(); iterator1.hasNext();) {
String include = (String) iterator1.next();
TypePattern includePattern = new PatternParser(include).parseTypePattern();
m_includeTypePattern.add(includePattern);
fastMatchInfo = looksLikeStartsWith(include);
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
if (fastMatchInfo != null) {
m_includeStartsWith.add(fastMatchInfo);
}
}
for (Iterator iterator1 = definition.getExcludePatterns().iterator(); iterator1.hasNext();) {
String exclude = (String) iterator1.next();
TypePattern excludePattern = new PatternParser(exclude).parseTypePattern();
m_excludeTypePattern.add(excludePattern);
fastMatchInfo = looksLikeStartsWith(exclude);
if (fastMatchInfo != null) {
m_excludeStartsWith.add(fastMatchInfo);
}
}
}
}
/**
* Checks if the type pattern can be handled as a startswith check
*
* TODO AV - enhance to support "char.sss" ie FQN direclty (match iff equals)
* we could also add support for "*..*charss" endsWith style?
*
* @param typePattern
* @return null if not possible, or the startWith sequence to test against
*/
private String looksLikeStartsWith(String typePattern) {
if (typePattern.indexOf('@') >= 0
|| typePattern.indexOf('+') >= 0
|| typePattern.indexOf(' ') >= 0
|| typePattern.charAt(typePattern.length()-1) != '*') {
return null;
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
}
int length = typePattern.length();
if (typePattern.endsWith("..*") && length > 3) {
if (typePattern.indexOf("..") == length-3
&& typePattern.indexOf('*') == length-1) {
return typePattern.substring(0, length-2).replace('$', '.');
}
}
return null;
}
/**
* Register the dump filter
*
* @param weaver
* @param loader
* @param definitions
*/
private void registerDump(final BcelWeaver weaver, final ClassLoader loader, final List definitions) {
for (Iterator iterator = definitions.iterator(); iterator.hasNext();) {
Definition definition = (Definition) iterator.next();
for (Iterator iterator1 = definition.getDumpPatterns().iterator(); iterator1.hasNext();) {
String dump = (String) iterator1.next();
TypePattern pattern = new PatternParser(dump).parseTypePattern();
m_dumpTypePattern.add(pattern);
}
if (definition.shouldDumpBefore()) {
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
m_dumpBefore = true;
}
}
}
protected boolean accept(String className, byte[] bytes) {
if (m_excludeTypePattern.isEmpty() && m_includeTypePattern.isEmpty()) {
return true;
}
String fastClassName = className.replace('/', '.').replace('$', '.');
for (int i = 0; i < m_excludeStartsWith.size(); i++) {
if (fastClassName.startsWith((String)m_excludeStartsWith.get(i))) {
return false;
}
}
/*
* Bug 120363
* If we have an exclude pattern that cannot be matched using "starts with"
* then we cannot fast accept
*/
if (m_excludeTypePattern.isEmpty()) {
boolean fastAccept = false;
for (int i = 0; i < m_includeStartsWith.size(); i++) {
fastAccept = fastClassName.startsWith((String)m_includeStartsWith.get(i));
if (fastAccept) {
break;
}
}
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
}
ensureDelegateInitialized(className,bytes);
ResolvedType classInfo = delegateForCurrentClass.getResolvedTypeX();
for (Iterator iterator = m_excludeTypePattern.iterator(); iterator.hasNext();) {
TypePattern typePattern = (TypePattern) iterator.next();
if (typePattern.matchesStatically(classInfo)) {
return false;
}
}
boolean accept = true;
for (Iterator iterator = m_includeTypePattern.iterator(); iterator.hasNext();) {
TypePattern typePattern = (TypePattern) iterator.next();
accept = typePattern.matchesStatically(classInfo);
if (accept) {
break;
}
}
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
return accept;
}
private boolean acceptAspect(String aspectClassName) {
if (m_aspectExcludeTypePattern.isEmpty() && m_aspectIncludeTypePattern.isEmpty()) {
return true;
}
String fastClassName = aspectClassName.replace('/', '.').replace('.', '$');
for (int i = 0; i < m_aspectExcludeStartsWith.size(); i++) {
if (fastClassName.startsWith((String)m_aspectExcludeStartsWith.get(i))) {
return false;
}
}
for (int i = 0; i < m_aspectIncludeStartsWith.size(); i++) {
if (fastClassName.startsWith((String)m_aspectIncludeStartsWith.get(i))) {
return true;
}
}
ResolvedType classInfo = weaver.getWorld().resolve(UnresolvedType.forName(aspectClassName), true);
for (Iterator iterator = m_aspectExcludeTypePattern.iterator(); iterator.hasNext();) {
TypePattern typePattern = (TypePattern) iterator.next();
if (typePattern.matchesStatically(classInfo)) {
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
return false;
}
}
boolean accept = true;
for (Iterator iterator = m_aspectIncludeTypePattern.iterator(); iterator.hasNext();) {
TypePattern typePattern = (TypePattern) iterator.next();
accept = typePattern.matchesStatically(classInfo);
if (accept) {
break;
}
}
return accept;
}
protected boolean shouldDump(String className, boolean before) {
if (before && !m_dumpBefore) {
return false;
}
if (m_dumpTypePattern.isEmpty()) {
return false;
}
ResolvedType classInfo = weaver.getWorld().resolve(UnresolvedType.forName(className), true);
for (Iterator iterator = m_dumpTypePattern.iterator(); iterator.hasNext();) {
TypePattern typePattern = (TypePattern) iterator.next();
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
if (typePattern.matchesStatically(classInfo)) {
return true;
}
}
return false;
}
/*
* shared classes methods
*/
/**
* @return Returns the key.
*/
public String getNamespace() {
if(namespace==null) return "";
else return new String(namespace);
}
/**
* Check to see if any classes are stored in the generated classes cache.
* Then flush the cache if it is not empty
* @param className TODO
* @return true if a class has been generated and is stored in the cache
*/
public boolean generatedClassesExistFor (String className) {
if (className == null) return !generatedClasses.isEmpty();
else return generatedClasses.containsKey(className);
}
/**
* Flush the generated classes cache
*/
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
|
public void flushGeneratedClasses() {
generatedClasses = new HashMap();
}
private void defineClass(ClassLoader loader, String name, byte[] bytes) {
if (trace.isTraceEnabled()) trace.enter("defineClass",this,new Object[] {loader,name,bytes});
Object clazz = null;
info("generating class '" + name + "'");
try {
Method defineClass = ClassLoader.class.getDeclaredMethod(
"defineClass", new Class[] { String.class,
bytes.getClass(), int.class, int.class });
defineClass.setAccessible(true);
clazz = defineClass.invoke(loader, new Object[] { name, bytes,
new Integer(0), new Integer(bytes.length) });
} catch (InvocationTargetException e) {
if (e.getTargetException() instanceof LinkageError) {
warn("define generated class failed",e.getTargetException());
} else {
warn("define generated class failed",e.getTargetException());
}
} catch (Exception e) {
warn("define generated class failed",e);
}
if (trace.isTraceEnabled()) trace.exit("defineClass",clazz);
}
}
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/DefaultMessageHandler.java
|
/*******************************************************************************
* Copyright (c) 2005 Contributors.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alexandre Vasseur initial implementation
*******************************************************************************/
package org.aspectj.weaver.loadtime;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.AbortException;
/**
* @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
*/
public class DefaultMessageHandler implements IMessageHandler {
boolean isVerbose = false;
boolean showWeaveInfo = false;
boolean showWarn = true;
public boolean handleMessage(IMessage message) throws AbortException {
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/DefaultMessageHandler.java
|
if (isIgnoring(message.getKind())) {
return false;
} else {
if (message.getKind().isSameOrLessThan(IMessage.INFO)) {
return SYSTEM_OUT.handleMessage(message);
} else {
return SYSTEM_ERR.handleMessage(message);
}
}
}
public boolean isIgnoring(IMessage.Kind kind) {
if (kind.equals(IMessage.WEAVEINFO)) {
return !showWeaveInfo;
}
if (kind.isSameOrLessThan(IMessage.INFO)) {
return !isVerbose;
}
return !showWarn;
}
public void dontIgnore(IMessage.Kind kind) {
if (kind.equals(IMessage.WEAVEINFO)) {
showWeaveInfo = true;
} else if (kind.equals(IMessage.DEBUG)) {
isVerbose = true;
} else if (kind.equals(IMessage.WARNING)) {
showWarn = false;
}
}
}
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/Options.java
|
/*******************************************************************************
* Copyright (c) 2005 Contributors.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alexandre Vasseur initial implementation
*******************************************************************************/
package org.aspectj.weaver.loadtime;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.bridge.Message;
import org.aspectj.util.LangUtil;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
/**
* A class that hanldes LTW options.
* Note: AV - I choosed to not reuse AjCompilerOptions and alike since those implies too many dependancies on
* jdt and ajdt modules.
*
* @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
*/
public class Options {
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/Options.java
|
private final static String OPTION_15 = "-1.5";
private final static String OPTION_lazyTjp = "-XlazyTjp";
private final static String OPTION_noWarn = "-nowarn";
private final static String OPTION_noWarnNone = "-warn:none";
private final static String OPTION_proceedOnError = "-proceedOnError";
private final static String OPTION_verbose = "-verbose";
private final static String OPTION_reweavable = "-Xreweavable";
private final static String OPTION_noinline = "-Xnoinline";
private final static String OPTION_addSerialVersionUID = "-XaddSerialVersionUID";
private final static String OPTION_hasMember = "-XhasMember";
private final static String OPTION_pinpoint = "-Xdev:pinpoint";
private final static String OPTION_showWeaveInfo = "-showWeaveInfo";
private final static String OPTIONVALUED_messageHandler = "-XmessageHandlerClass:";
private static final String OPTIONVALUED_Xlintfile = "-Xlintfile:";
private static final String OPTIONVALUED_Xlint = "-Xlint:";
private static final String OPTIONVALUED_joinpoints = "-Xjoinpoints:";
private static final String OPTIONVALUED_Xset = "-Xset:";
public static WeaverOption parse(String options, ClassLoader laoder, IMessageHandler imh) {
WeaverOption weaverOption = new WeaverOption(imh);
if (LangUtil.isEmpty(options)) {
return weaverOption;
}
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/Options.java
|
List flags = LangUtil.anySplit(options, " ");
Collections.reverse(flags);
for (Iterator iterator = flags.iterator(); iterator.hasNext();) {
String arg = (String) iterator.next();
if (arg.startsWith(OPTIONVALUED_messageHandler)) {
if (arg.length() > OPTIONVALUED_messageHandler.length()) {
String handlerClass = arg.substring(OPTIONVALUED_messageHandler.length()).trim();
try {
Class handler = Class.forName(handlerClass, false, laoder);
weaverOption.messageHandler = ((IMessageHandler) handler.newInstance());
} catch (Throwable t) {
weaverOption.messageHandler.handleMessage(
new Message(
"Cannot instantiate message handler " + handlerClass,
IMessage.ERROR,
t,
null
)
);
}
}
}
}
for (Iterator iterator = flags.iterator(); iterator.hasNext();) {
String arg = (String) iterator.next();
if (arg.equals(OPTION_15)) {
weaverOption.java5 = true;
} else if (arg.equalsIgnoreCase(OPTION_lazyTjp)) {
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/Options.java
|
weaverOption.lazyTjp = true;
} else if (arg.equalsIgnoreCase(OPTION_noinline)) {
weaverOption.noInline = true;
} else if (arg.equalsIgnoreCase(OPTION_addSerialVersionUID)) {
weaverOption.addSerialVersionUID=true;
} else if (arg.equalsIgnoreCase(OPTION_noWarn) || arg.equalsIgnoreCase(OPTION_noWarnNone)) {
weaverOption.noWarn = true;
} else if (arg.equalsIgnoreCase(OPTION_proceedOnError)) {
weaverOption.proceedOnError = true;
} else if (arg.equalsIgnoreCase(OPTION_reweavable)) {
weaverOption.notReWeavable = false;
} else if (arg.equalsIgnoreCase(OPTION_showWeaveInfo)) {
weaverOption.showWeaveInfo = true;
} else if (arg.equalsIgnoreCase(OPTION_hasMember)) {
weaverOption.hasMember = true;
} else if (arg.startsWith(OPTIONVALUED_joinpoints)) {
if (arg.length()>OPTIONVALUED_joinpoints.length())
weaverOption.optionalJoinpoints = arg.substring(OPTIONVALUED_joinpoints.length()).trim();
} else if (arg.equalsIgnoreCase(OPTION_verbose)) {
weaverOption.verbose = true;
} else if (arg.equalsIgnoreCase(OPTION_pinpoint)) {
weaverOption.pinpoint = true;
} else if (arg.startsWith(OPTIONVALUED_messageHandler)) {
;
} else if (arg.startsWith(OPTIONVALUED_Xlintfile)) {
if (arg.length() > OPTIONVALUED_Xlintfile.length()) {
weaverOption.lintFile = arg.substring(OPTIONVALUED_Xlintfile.length()).trim();
}
} else if (arg.startsWith(OPTIONVALUED_Xlint)) {
if (arg.length() > OPTIONVALUED_Xlint.length()) {
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/Options.java
|
weaverOption.lint = arg.substring(OPTIONVALUED_Xlint.length()).trim();
}
} else if (arg.startsWith(OPTIONVALUED_Xset)) {
if (arg.length() > OPTIONVALUED_Xlint.length()) {
weaverOption.xSet = arg.substring(OPTIONVALUED_Xset.length()).trim();
}
} else {
weaverOption.messageHandler.handleMessage(
new Message(
"Cannot configure weaver with option '" + arg + "': unknown option",
IMessage.WARNING,
null,
null
)
);
}
}
if (weaverOption.noWarn) {
weaverOption.messageHandler.dontIgnore(IMessage.WARNING);
}
if (weaverOption.verbose) {
weaverOption.messageHandler.dontIgnore(IMessage.INFO);
}
if (weaverOption.showWeaveInfo) {
weaverOption.messageHandler.dontIgnore(IMessage.WEAVEINFO);
}
return weaverOption;
}
public static class WeaverOption {
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
loadtime/src/org/aspectj/weaver/loadtime/Options.java
|
boolean java5;
boolean lazyTjp;
boolean hasMember;
String optionalJoinpoints;
boolean noWarn;
boolean proceedOnError;
boolean verbose;
boolean notReWeavable = true;
boolean noInline;
boolean addSerialVersionUID;
boolean showWeaveInfo;
boolean pinpoint;
IMessageHandler messageHandler;
String lint;
String lintFile;
String xSet;
public WeaverOption(IMessageHandler imh) {
this.messageHandler = imh;
}
}
}
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
tests/java5/ataspectj/ataspectj/TestHelper.java
|
/*******************************************************************************
* Copyright (c) 2005 Contributors.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://eclipse.org/legal/epl-v10.html
*
* Contributors:
* initial implementation Alexandre Vasseur
*******************************************************************************/
package ataspectj;
import junit.textui.TestRunner;
import junit.framework.TestResult;
import junit.framework.Assert;
import junit.framework.TestFailure;
import java.util.Enumeration;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.AbortException;
import org.aspectj.weaver.loadtime.DefaultMessageHandler;
/**
* Helper to run a test as a main class, but still throw exception and not just print on stderr
* upon test failure.
* <p/>
* This is required for Ajc test case that are also designed to work with LTW.
*
* @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
*/
public class TestHelper extends DefaultMessageHandler {
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
tests/java5/ataspectj/ataspectj/TestHelper.java
|
public static void runAndThrowOnFailure(junit.framework.Test test) {
TestRunner r = new TestRunner();
TestResult rr = r.doRun(test);
if (!rr.wasSuccessful()) {
StringBuffer sb = new StringBuffer("\n");
Enumeration e = rr.failures();
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
tests/java5/ataspectj/ataspectj/TestHelper.java
|
while (e.hasMoreElements()) {
sb.append("JUnit Failure: ");
TestFailure failure = (TestFailure)e.nextElement();
sb.append(failure.thrownException().toString());
sb.append("\n");
}
e = rr.errors();
while (e.hasMoreElements()) {
sb.append("JUnit Error: ");
TestFailure failure = (TestFailure)e.nextElement();
sb.append(failure.thrownException().toString());
sb.append("\n");
}
throw new RuntimeException(sb.toString());
}
}
public boolean handleMessage(IMessage message) throws AbortException {
boolean ret = super.handleMessage(message);
if (message.getKind().isSameOrLessThan(IMessage.INFO)) {
;
} else {
System.err.println("*** Exiting - got a warning/fail/error/abort IMessage");
System.exit(-1);
}
return ret;
}
}
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
|
/* *******************************************************************
* Copyright (c) 2004 IBM Corporation
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Matthew Webster, Adrian Colyer,
* Martin Lippert initial implementation
* ******************************************************************/
package org.aspectj.weaver.tools;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
|
import org.aspectj.bridge.AbortException;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.IMessageContext;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.bridge.Message;
import org.aspectj.bridge.MessageUtil;
import org.aspectj.bridge.MessageWriter;
import org.aspectj.bridge.Version;
import org.aspectj.bridge.WeaveMessage;
import org.aspectj.bridge.IMessage.Kind;
import org.aspectj.org.objectweb.asm.ClassReader;
import org.aspectj.util.FileUtil;
import org.aspectj.util.LangUtil;
import org.aspectj.weaver.IClassFileProvider;
import org.aspectj.weaver.IWeaveRequestor;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.bcel.BcelObjectType;
import org.aspectj.weaver.bcel.BcelWeaver;
import org.aspectj.weaver.bcel.BcelWorld;
import org.aspectj.weaver.bcel.UnwovenClassFile;
import org.aspectj.weaver.bcel.Utility;
/**
* This adaptor allows the AspectJ compiler to be embedded in an existing
* system to facilitate load-time weaving. It provides an interface for a
* weaving class loader to provide a classpath to be woven by a set of
* aspects. A callback is supplied to allow a class loader to define classes
* generated by the compiler during the weaving process.
* <p>
* A weaving class loader should create a <code>WeavingAdaptor</code> before
* any classes are defined, typically during construction. The set of aspects
|
150,271 |
Bug 150271 Allow multiple levels of LTW information
|
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
|
resolved fixed
|
8549d86
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-23T11:52:22Z | 2006-07-11T15:00:00Z |
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
|
* passed to the adaptor is fixed for the lifetime of the adaptor although the
* classpath can be augmented. A system property can be set to allow verbose
* weaving messages to be written to the console.
*
*/
public class WeavingAdaptor implements IMessageContext {
/**
* System property used to turn on verbose weaving messages
*/
public static final String WEAVING_ADAPTOR_VERBOSE = "aj.weaving.verbose";
public static final String SHOW_WEAVE_INFO_PROPERTY = "org.aspectj.weaver.showWeaveInfo";
public static final String TRACE_MESSAGES_PROPERTY = "org.aspectj.tracing.messages";
private boolean enabled = true;
protected boolean verbose = getVerbose();
protected BcelWorld bcelWorld;
protected BcelWeaver weaver;
private IMessageHandler messageHandler;
private WeavingAdaptorMessageHandler messageHolder;
protected GeneratedClassHandler generatedClassHandler;
protected Map generatedClasses = new HashMap();
protected BcelObjectType delegateForCurrentClass;
private static Trace trace = TraceFactory.getTraceFactory().getTrace(WeavingAdaptor.class);
protected WeavingAdaptor () {
}
/**
* Construct a WeavingAdaptor with a reference to a weaving class loader. The
* adaptor will automatically search the class loader hierarchy to resolve
* classes. The adaptor will also search the hierarchy for WeavingClassLoader
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.