diff options
author | jhugunin <jhugunin> | 2003-03-12 19:52:13 +0000 |
---|---|---|
committer | jhugunin <jhugunin> | 2003-03-12 19:52:13 +0000 |
commit | db37189cebba13a30b7ccdabe70565caa7506c00 (patch) | |
tree | 2d9d79a58d108057d638eafcfd68a6b060377f5a /org.aspectj.ajdt.core | |
parent | a57ec8d9cff0ca35ce9efb59c79a5f1ec90c13cb (diff) | |
download | aspectj-db37189cebba13a30b7ccdabe70565caa7506c00.tar.gz aspectj-db37189cebba13a30b7ccdabe70565caa7506c00.zip |
fix and test for Bugzilla Bug 34820
ajc -aspectpath fails with NPE for cflow pointcuts
Diffstat (limited to 'org.aspectj.ajdt.core')
3 files changed, 11 insertions, 45 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseAdvice.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseAdvice.java deleted file mode 100644 index e55174903..000000000 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseAdvice.java +++ /dev/null @@ -1,43 +0,0 @@ -/* ******************************************************************* - * 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 Common Public License v1.0 - * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/cpl-v10.html - * - * Contributors: - * PARC initial implementation - * ******************************************************************/ - - -package org.aspectj.ajdt.internal.compiler.lookup; - -import org.aspectj.weaver.Advice; -import org.aspectj.weaver.AjAttribute; -import org.aspectj.weaver.Member; -import org.aspectj.weaver.Shadow; -import org.aspectj.weaver.patterns.Pointcut; - - -public class EclipseAdvice extends Advice { - public EclipseAdvice(AjAttribute.AdviceAttribute attribute, Pointcut pointcut, Member signature) { - - super(attribute, pointcut, signature); - } - - - - public void implementOn(Shadow shadow) { - throw new RuntimeException("unimplemented"); - } - - public void specializeOn(Shadow shadow) { - throw new RuntimeException("unimplemented"); - } - - public int compareTo(Object other) { - throw new RuntimeException("unimplemented"); - } - -} diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java index 68c875bfc..4e59b6d8b 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java @@ -7,7 +7,7 @@ * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: - * PARC initial implementation + * PARC initial implementation * ******************************************************************/ @@ -152,7 +152,8 @@ public class EclipseFactory { public EclipseTypeMunger makeEclipseTypeMunger(ConcreteTypeMunger concrete) { if (concrete instanceof EclipseTypeMunger) return (EclipseTypeMunger)concrete; - if (EclipseTypeMunger.supportsKind(concrete.getMunger().getKind())) { + + if (concrete.getMunger() != null && EclipseTypeMunger.supportsKind(concrete.getMunger().getKind())) { return new EclipseTypeMunger(this, concrete.getMunger(), concrete.getAspectType(), null); } else { return null; diff --git a/org.aspectj.ajdt.core/testdata/src1/binary/lib/ConcreteA.aj b/org.aspectj.ajdt.core/testdata/src1/binary/lib/ConcreteA.aj index 15a3d5cc6..12a7aa38a 100644 --- a/org.aspectj.ajdt.core/testdata/src1/binary/lib/ConcreteA.aj +++ b/org.aspectj.ajdt.core/testdata/src1/binary/lib/ConcreteA.aj @@ -11,4 +11,12 @@ public aspect ConcreteA { public static class MyException extends Exception {}
declare soft: MyException: withincode(new(..));
+
+
+ // added this to cover Bugzilla Bug 34820
+ // ajc -aspectpath fails with NPE for cflow pointcuts
+ int counter = 0;
+ before(): cflow(within(client..*)) && call(* println(..)) {
+ counter ++;
+ }
}
\ No newline at end of file |