summaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-09-24 09:34:13 +0000
committeracolyer <acolyer>2005-09-24 09:34:13 +0000
commita4a9090d88bd1a79d87f0bc08aff7fa627e81f99 (patch)
treed700e072d3c1b4a48f72a637580ed62e368e46c9 /org.aspectj.ajdt.core
parent7d73ff1418686ae98e13b83931c721f4637b9a34 (diff)
downloadaspectj-a4a9090d88bd1a79d87f0bc08aff7fa627e81f99.tar.gz
aspectj-a4a9090d88bd1a79d87f0bc08aff7fa627e81f99.zip
tests and fix for pr77076 - MUCH better toleration of missing types when weaving into jars etc..
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java11
-rw-r--r--org.aspectj.ajdt.core/testdata/OutjarTest/aspects.jarbin1340 -> 1417 bytes
-rw-r--r--org.aspectj.ajdt.core/testdata/OutjarTest/src/jar3/Aspect.aj2
-rw-r--r--org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/OutjarTest.java2
4 files changed, 12 insertions, 3 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
index 9df1db2e0..0a3887882 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
@@ -74,6 +74,8 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation;
import org.aspectj.org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
import org.aspectj.util.FileUtil;
import org.aspectj.weaver.Dump;
+import org.aspectj.weaver.MissingResolvedTypeWithKnownSignature;
+import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.World;
import org.aspectj.weaver.bcel.BcelWeaver;
import org.aspectj.weaver.bcel.BcelWorld;
@@ -591,7 +593,14 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc
bcelWeaver.setReweavableMode(buildConfig.isXreweavable(),buildConfig.getXreweavableCompressClasses());
//check for org.aspectj.runtime.JoinPoint
- bcelWorld.resolve("org.aspectj.lang.JoinPoint");
+ ResolvedType joinPoint = bcelWorld.resolve("org.aspectj.lang.JoinPoint");
+ if (joinPoint.isMissing()) {
+ IMessage message =
+ new Message("classpath error: unable to find org.aspectj.lang.JoinPoint (check that aspectjrt.jar is in your classpath)",
+ null,
+ true);
+ handler.handleMessage(message);
+ }
}
public World getWorld() {
diff --git a/org.aspectj.ajdt.core/testdata/OutjarTest/aspects.jar b/org.aspectj.ajdt.core/testdata/OutjarTest/aspects.jar
index 10a45fd7e..a0245667a 100644
--- a/org.aspectj.ajdt.core/testdata/OutjarTest/aspects.jar
+++ b/org.aspectj.ajdt.core/testdata/OutjarTest/aspects.jar
Binary files differ
diff --git a/org.aspectj.ajdt.core/testdata/OutjarTest/src/jar3/Aspect.aj b/org.aspectj.ajdt.core/testdata/OutjarTest/src/jar3/Aspect.aj
index afe7cbf5d..4bfb0e01d 100644
--- a/org.aspectj.ajdt.core/testdata/OutjarTest/src/jar3/Aspect.aj
+++ b/org.aspectj.ajdt.core/testdata/OutjarTest/src/jar3/Aspect.aj
@@ -13,7 +13,7 @@ package jar3;
public aspect Aspect {
pointcut main () :
- execution(* *.main(..));
+ execution(* Parent+.main(..));
after () : main () {
System.out.println("? Aspect.main()");
diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/OutjarTest.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/OutjarTest.java
index ee3be8814..8e26f1b75 100644
--- a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/OutjarTest.java
+++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/OutjarTest.java
@@ -110,7 +110,7 @@ public class OutjarTest extends AjcTestCase {
*/
public void testOutjarDeletedOnError () {
String[] args = new String[] {"-aspectpath", aspectjarName, "-injars", injarName, "-outjar", outjarName};
- Message error = new Message(WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE,"jar1.Parent"));
+ Message error = new Message(WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE_INTERFACES,"jar1.Parent"));
MessageSpec spec = new MessageSpec(null,newMessageList(error));
CompilationResult result = ajc(baseDir,args);
// System.out.println(result);